diff options
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 65583a330..16f3b48d7 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -91,8 +91,11 @@ _unlink (const char *ourname) { CloseHandle (h); syscall_printf ("CreateFile/CloseHandle succeeded"); - res = 0; - break; + if (i > 0 || GetFileAttributes (win32_name) == (DWORD) -1) + { + res = 0; + break; + } } if (i > 0) |