From fc22563658a795e5bbd316245caabae6ae0f4252 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 8 Jul 2011 05:41:52 +0000 Subject: * 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 --- win32/win32.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'win32/win32.c') 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; } -- cgit v1.2.3