From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <54919b958ba942aad353838906904f44@quintile.net> From: "Steve Simon" Date: Tue, 5 Feb 2019 11:56:33 +0000 To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] cifs buglet Topicbox-Message-UUID: f4b7392e-ead9-11e9-9d60-3106f5b1d025 Hi all (who remain true to the cause :-), I cam across a bug in cifs. An empty directory under windows 7 pro contains a single entry "." but it doesn't appear to contain "..". As a result "." is not removed on dirscan and plan9 gets when trying to traverse the hierarchy. diff /n/dump/2019/0205/sys/src/cmd/cifs/main.c /sys/src/cmd/cifs/main.c 261,265c261,263 < if(got >= 2 && strcmp(fi[0].name, ".") == 0 && < strcmp(fi[1].name, "..") == 0){ < a->end = (got - 2) * sizeof(FInfo); < memmove(a->cache, a->cache + sizeof(FInfo)*2, < a->end - a->off); --- > while(strcmp(fi[0].name, ".") == 0 || strcmp(fi[0].name, "..") == 0){ > a->end = (got -1) * sizeof(FInfo); > memmove(a->cache, a->cache + sizeof(FInfo), a->end - a->off); -Steve