gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r577152 - /gump/trunk/python/gump/util/sync.py
Date Wed, 19 Sep 2007 04:48:10 GMT
Author: bodewig
Date: Tue Sep 18 21:48:04 2007
New Revision: 577152

URL: http://svn.apache.org/viewvc?rev=577152&view=rev
Log:
properly sync symlinks to directories from source

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=577152&r1=577151&r2=577152&view=diff
==============================================================================
--- gump/trunk/python/gump/util/sync.py (original)
+++ gump/trunk/python/gump/util/sync.py Tue Sep 18 21:48:04 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