summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/win32/win32.c b/win32/win32.c
index e3bba4412f..6699c2cd44 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5642,18 +5642,13 @@ wunlink(const WCHAR *path)
if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
SetFileAttributesW(path, attr & ~FILE_ATTRIBUTE_READONLY);
}
- if (DeleteFileW(path) == FALSE) {
+ if (!DeleteFileW(path)) {
errno = map_errno(GetLastError());
ret = -1;
if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
SetFileAttributesW(path, attr);
}
}
- else {
- while (GetFileAttributesW(path) != (DWORD)-1 || GetLastError() != ERROR_FILE_NOT_FOUND) {
- Sleep(0);
- }
- }
});
return ret;
}