1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00

return . and .. first in readdir - this fixes masktest on IRIX which

returns . then single letter files then .. then all other files.
(This used to be commit d4d9361eec)
This commit is contained in:
Herb Lewis 2002-03-21 14:00:13 +00:00
parent 73c45a4a6f
commit 1783dcd2f1

View File

@ -729,10 +729,22 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
dirp->pos = dirp->numentries = dirp->mallocsize = 0;
dirp->data = dirp->current = NULL;
while ((n = vfs_readdirname(conn, p)))
while (True)
{
int l;
if (used == 0) {
n = ".";
} else if (used == 2) {
n = "..";
} else {
n = vfs_readdirname(conn, p);
if (n == NULL)
break;
if ((strcmp(".",n) == 0) ||(strcmp("..",n) == 0))
continue;
}
l = strlen(n)+1;
/* If it's a vetoed file, pretend it doesn't even exist */