Commit 3b74ac0f authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

ntdll: Fix the "not found" status set by read_directory_stat() and…

ntdll: Fix the "not found" status set by read_directory_stat() and read_directory_getattrlist() for when restart_scan is set.
parent e7fa7663
......@@ -2103,7 +2103,7 @@ static int read_directory_stat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG
info->next = 0;
if (io->u.Status != STATUS_BUFFER_OVERFLOW) lseek( fd, 1, SEEK_CUR );
}
else io->u.Status = STATUS_NO_MORE_FILES;
else io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES;
}
else if (!case_sensitive && ret && (errno == ENOENT || errno == ENOTDIR))
{
......@@ -2112,7 +2112,7 @@ static int read_directory_stat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG
* read_directory_* function (we need to return the case-preserved
* filename stored on the filesystem). */
ret = 0;
io->u.Status = STATUS_NO_MORE_FILES;
io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES;
}
else
{
......@@ -2197,11 +2197,11 @@ static int read_directory_getattrlist( int fd, IO_STATUS_BLOCK *io, void *buffer
info->next = 0;
if (io->u.Status != STATUS_BUFFER_OVERFLOW) lseek( fd, 1, SEEK_CUR );
}
else io->u.Status = STATUS_NO_MORE_FILES;
else io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES;
}
else if ((errno == ENOENT || errno == ENOTDIR) && !get_dir_case_sensitivity("."))
{
io->u.Status = STATUS_NO_MORE_FILES;
io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES;
ret = 0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment