mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 20:39:33 +08:00
* 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,14 +514,13 @@ check_dir_not_empty (HANDLE dir)
|
||||
int cnt = 1;
|
||||
while (pfni->NextEntryOffset)
|
||||
{
|
||||
if (++cnt > 2)
|
||||
{
|
||||
syscall_printf ("Directory not empty");
|
||||
return STATUS_DIRECTORY_NOT_EMPTY;
|
||||
}
|
||||
pfni = (PFILE_NAMES_INFORMATION)
|
||||
((caddr_t) pfni + pfni->NextEntryOffset);
|
||||
++cnt;
|
||||
}
|
||||
if (cnt > 2)
|
||||
{
|
||||
syscall_printf ("Directory not empty");
|
||||
return STATUS_DIRECTORY_NOT_EMPTY;
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user