##// END OF EJS Templates
Use shutil.copystat in copyfile().
Will Maier -
r7767:b2410ed2 default
parent child Browse files
Show More
@@ -760,7 +760,7 b' def unlink(f):'
760 pass
760 pass
761
761
762 def copyfile(src, dest):
762 def copyfile(src, dest):
763 "copy a file, preserving mode"
763 "copy a file, preserving mode and atime/mtime"
764 if os.path.islink(src):
764 if os.path.islink(src):
765 try:
765 try:
766 os.unlink(dest)
766 os.unlink(dest)
@@ -770,7 +770,7 b' def copyfile(src, dest):'
770 else:
770 else:
771 try:
771 try:
772 shutil.copyfile(src, dest)
772 shutil.copyfile(src, dest)
773 shutil.copymode(src, dest)
773 shutil.copystat(src, dest)
774 except shutil.Error, inst:
774 except shutil.Error, inst:
775 raise Abort(str(inst))
775 raise Abort(str(inst))
776
776
General Comments 0
You need to be logged in to leave comments. Login now