* 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>
|
2010-12-12 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* init.cc (search_for): Put this in shared section or suffer subtle
|
* 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;
|
int cnt = 1;
|
||||||
while (pfni->NextEntryOffset)
|
while (pfni->NextEntryOffset)
|
||||||
{
|
{
|
||||||
|
if (++cnt > 2)
|
||||||
|
{
|
||||||
|
syscall_printf ("Directory not empty");
|
||||||
|
return STATUS_DIRECTORY_NOT_EMPTY;
|
||||||
|
}
|
||||||
pfni = (PFILE_NAMES_INFORMATION)
|
pfni = (PFILE_NAMES_INFORMATION)
|
||||||
((caddr_t) pfni + pfni->NextEntryOffset);
|
((caddr_t) pfni + pfni->NextEntryOffset);
|
||||||
++cnt;
|
|
||||||
}
|
|
||||||
if (cnt > 2)
|
|
||||||
{
|
|
||||||
syscall_printf ("Directory not empty");
|
|
||||||
return STATUS_DIRECTORY_NOT_EMPTY;
|
|
||||||
}
|
}
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue