summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-08 05:41:52 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-08 05:41:52 +0000
commitfc22563658a795e5bbd316245caabae6ae0f4252 (patch)
treef8ea2d0770b0c3860bbff05838b9329cc5438cd1 /win32
parentc3e05262697f64218259b63acfd6933958c62eae (diff)
* win32/win32.c (wunlink): reverted a part of r32426. it was mistakenly
mixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}