0

fixed permission copying, fixes Issue #646

This commit is contained in:
Aaron Griffith
2012-03-14 00:30:41 -04:00
parent 2de1405624
commit 3bbab24a5b

View File

@@ -108,8 +108,9 @@ if renameworks:
"some cleanup first, but I couldn't remove "
"'%s'!", self.tmpname)
else:
# copy permission bits
shutil.copymode(self.tmpname, self.destname)
# copy permission bits, if needed
if os.path.exists(self.destname):
shutil.copymode(self.destname, self.tmpname)
# atomic rename into place
os.rename(self.tmpname, self.destname)
else: