* syscalls.cc (check_dir_not_empty): Never count more than 3 directory
entries.
This commit is contained in:
parent
f646aeb049
commit
e52961c403
|
@ -1,3 +1,8 @@
|
|||
2010-12-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* syscalls.cc (check_dir_not_empty): Never count more than 3 directory
|
||||
entries.
|
||||
|
||||
2010-12-12 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* init.cc (search_for): Put this in shared section or suffer subtle
|
||||
|
|
|
@ -514,15 +514,14 @@ check_dir_not_empty (HANDLE dir)
|
|||
int cnt = 1;
|
||||
while (pfni->NextEntryOffset)
|
||||
{
|
||||
pfni = (PFILE_NAMES_INFORMATION)
|
||||
((caddr_t) pfni + pfni->NextEntryOffset);
|
||||
++cnt;
|
||||
}
|
||||
if (cnt > 2)
|
||||
if (++cnt > 2)
|
||||
{
|
||||
syscall_printf ("Directory not empty");
|
||||
return STATUS_DIRECTORY_NOT_EMPTY;
|
||||
}
|
||||
pfni = (PFILE_NAMES_INFORMATION)
|
||||
((caddr_t) pfni + pfni->NextEntryOffset);
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue