* dir.cc (rmdir): Care for misleading error messages
when trying to remove a directory on a samba share. Eliminate superfluous else branch. * syscalls.cc (_rename): Additional check for ERROR_FILE_EXISTS if MoveFile fails.
This commit is contained in:
@@ -1231,7 +1231,8 @@ _rename (const char *oldpath, const char *newpath)
|
||||
if (!MoveFile (real_old.get_win32 (), real_new.get_win32 ()))
|
||||
res = -1;
|
||||
|
||||
if (res == 0 || GetLastError () != ERROR_ALREADY_EXISTS)
|
||||
if (res == 0 || (GetLastError () != ERROR_ALREADY_EXISTS
|
||||
&& GetLastError () != ERROR_FILE_EXISTS))
|
||||
goto done;
|
||||
|
||||
if (os_being_run == winNT)
|
||||
|
Reference in New Issue
Block a user