1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2011-07-08 05:41:52 +00:00
parent c3e0526269
commit fc22563658
2 changed files with 6 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Fri Jul 8 14:40:39 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (wunlink): reverted a part of r32426. it was mistakenly
mixed.
Fri Jul 8 14:29:47 2011 Narihiro Nakamura <authornari@gmail.com>
* configure.in: can't subtract void *.

View file

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