apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r202350 - /apr/apr/branches/1.1.x/file_io/os2/open.c
Date Wed, 29 Jun 2005 11:46:34 GMT
Author: bjh
Date: Wed Jun 29 04:46:34 2005
New Revision: 202350

URL: http://svn.apache.org/viewcvs?rev=202350&view=rev
Log:
OS/2: Using apr_file_rename() to replace one file with another doesn't work
on some types of network drive as the file system driver returns a different
error code when an attempt is made to rename to an existing file name.

Allow for this error code, ERROR_ALREADY_EXISTS.


Modified:
    apr/apr/branches/1.1.x/file_io/os2/open.c

Modified: apr/apr/branches/1.1.x/file_io/os2/open.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/file_io/os2/open.c?rev=202350&r1=202349&r2=202350&view=diff
==============================================================================
--- apr/apr/branches/1.1.x/file_io/os2/open.c (original)
+++ apr/apr/branches/1.1.x/file_io/os2/open.c Wed Jun 29 04:46:34 2005
@@ -158,7 +158,7 @@
 {
     ULONG rc = DosMove(from_path, to_path);
 
-    if (rc == ERROR_ACCESS_DENIED) {
+    if (rc == ERROR_ACCESS_DENIED || rc == ERROR_ALREADY_EXISTS) {
         rc = DosDelete(to_path);
 
         if (rc == 0 || rc == ERROR_FILE_NOT_FOUND) {



Mime
View raw message