You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/02/11 15:05:02 UTC

svn commit: r908980 - /subversion/trunk/subversion/libsvn_subr/io.c

Author: rhuijben
Date: Thu Feb 11 14:04:58 2010
New Revision: 908980

URL: http://svn.apache.org/viewvc?rev=908980&view=rev
Log:
Following up on r896915, also handle EEXISTS as a trigger for trying to
reset the read only attribute. FAT and FAT32 filesystems on Windows XP and
later return this error instead of access denied on the failed rename
operation.

Found by performing statistical analysis over AnkhSVN error reports.
(We applied r896915 on 1.6.x in an attempt to discover the cause of
 what is now better known as issue #3574.)

* subversion/libsvn_subr/io.c
  (svn_io_file_rename): Also check for EEXISTS.

Modified:
    subversion/trunk/subversion/libsvn_subr/io.c

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=908980&r1=908979&r2=908980&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Thu Feb 11 14:04:58 2010
@@ -2949,7 +2949,7 @@
   status = apr_file_rename(from_path_apr, to_path_apr, pool);
 
 #ifdef WIN32
-  if (APR_STATUS_IS_EACCES(status))
+  if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status))
     {
       /* Set the destination file writable because Windows will not
          allow us to rename when to_path is read-only, but will