apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: svn commit: r202348 - /apr/apr/trunk/file_io/os2/open.c
Date Wed, 29 Jun 2005 23:00:42 GMT
On Wed, 29 Jun 2005 11:26:09 -0500, William A. Rowe, Jr. wrote:

>Does anyone have 30 mintues to check if the same patch is
>needed on Win32?  My gut says to assume it is, and fix this
>appropriately.

No, the Win32 version uses MoveFileEx() with a MOVEFILE_REPLACE_EXISTING
flag or (on Win9x which doesn't have MoveFileEx()) tests for the
destination existing before attempting the move.



>Bill
>
>At 06:34 AM 6/29/2005, bjh@apache.org wrote:
>>Author: bjh
>>Date: Wed Jun 29 04:34:19 2005
>>New Revision: 202348
>>
>>URL: http://svn.apache.org/viewcvs?rev=202348&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/trunk/file_io/os2/open.c
>>
>>Modified: apr/apr/trunk/file_io/os2/open.c
>>URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/open.c?rev=202348&r1=202347&r2=202348&view=diff
>>==============================================================================
>>--- apr/apr/trunk/file_io/os2/open.c (original)
>>+++ apr/apr/trunk/file_io/os2/open.c Wed Jun 29 04:34:19 2005
>>@@ -156,7 +156,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) {
>
>
>

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message