Modify creation of symlinks

This commit is contained in:
narv
2011-02-02 15:57:28 -07:00
parent 0b89e41c0d
commit 38e29f487f

View File

@@ -519,10 +519,10 @@ class LLManifest(object):
def ccopy(self, src, dst):
""" Copy a single file or symlink. Uses filecmp to skip copying for existing files."""
if os.path.islink(src):
#linkto = os.readlink(src)
linkto = os.readlink(src)
if os.path.islink(dst) or os.path.exists(dst):
os.remove(dst) # because symlinking over an existing link fails
shutil.copy2(src, dst)
os.symlink(linkto, dst)
else:
# Don't recopy file if it's up-to-date.
# If we seem to be not not overwriting files that have been