+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
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;
}