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 2007/09/19 06:48:10 UTC
svn commit: r577152 - /gump/trunk/python/gump/util/sync.py
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):