gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r577673 - /gump/live/python/gump/util/sync.py
Date Thu, 20 Sep 2007 10:26:40 GMT
Author: bodewig
Date: Thu Sep 20 03:26:33 2007
New Revision: 577673

URL: http://svn.apache.org/viewvc?rev=577673&view=rev
Log:
merge sync change - properly deal with symlinks in source tree - from r577152 of trunk

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

Modified: gump/live/python/gump/util/sync.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/util/sync.py?rev=577673&r1=577672&r2=577673&view=diff
==============================================================================
--- gump/live/python/gump/util/sync.py (original)
+++ gump/live/python/gump/util/sync.py Thu Sep 20 03:26:33 2007
@@ -190,6 +190,11 @@
                 
             try:
                 if symlinks and os.path.islink(srcname):
+                    if os.path.exists(dstname):
+                        if os.path.islink(dstname) or os.path.isfile(dstname):
+                            os.remove(dstname)
+                        else:
+                            shutil.rmtree(dstname, True)
                     linkto = os.readlink(srcname)
                     os.symlink(linkto, dstname)
                 elif os.path.isdir(srcname):



Mime
View raw message