##// END OF EJS Templates
fix util.copyfile to deal with symlinks
Eric St-Jean -
r4271:1eaa8d90 default
parent child Browse files
Show More
@@ -614,6 +614,13 b' def unlink(f):'
614
614
615 def copyfile(src, dest):
615 def copyfile(src, dest):
616 "copy a file, preserving mode"
616 "copy a file, preserving mode"
617 if os.path.islink(src):
618 try:
619 os.unlink(dest)
620 except:
621 pass
622 os.symlink(os.readlink(src), dest)
623 else:
617 try:
624 try:
618 shutil.copyfile(src, dest)
625 shutil.copyfile(src, dest)
619 shutil.copymode(src, dest)
626 shutil.copymode(src, dest)
General Comments 0
You need to be logged in to leave comments. Login now