You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by bo...@apache.org on 2010/04/06 06:35:50 UTC

svn commit: r931011 - /gump/trunk/python/gump/util/sync.py

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]" \