gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r931011 - /gump/trunk/python/gump/util/sync.py
Date Tue, 06 Apr 2010 04:35:50 GMT
Author: bodewig
Date: Tue Apr  6 04:35:50 2010
New Revision: 931011

URL: http://svn.apache.org/viewvc?rev=931011&view=rev
Log:
remove dest file before copy, this should help if the dest file is read-only

Modified:
    gump/trunk/python/gump/util/sync.py

Modified: gump/trunk/python/gump/util/sync.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/util/sync.py?rev=931011&r1=931010&r2=931011&view=diff
==============================================================================
--- gump/trunk/python/gump/util/sync.py (original)
+++ gump/trunk/python/gump/util/sync.py Tue Apr  6 04:35:50 2010
@@ -346,6 +346,8 @@ class PathWalker(Annotatable):
                 log.debug("Attempting copy from [%s] to [%s]"
                           %(`srcname`, `dstname`))
             self.displayAction(True, ' U> ', dstname, reason)
+            if os.path.exists(dstname):
+                os.remove(dstname)
             shutil.copy2(srcname, dstname)
         #else:
         #    log.debug("Do not copy from [%s:%s] to [%s:%s]" \



Mime
View raw message