* 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:
Corinna Vinschen
2000-05-22 17:15:47 +00:00
parent 7054be8b55
commit 6892216822
3 changed files with 26 additions and 8 deletions

View File

@@ -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)