copy2->copyfile

This commit is contained in:
Damien Elmes 2012-04-22 07:32:14 +09:00
parent 1df641da6f
commit fdbed4ba17
2 changed files with 2 additions and 2 deletions

View file

@ -254,7 +254,7 @@ Are you sure?"""):
n = backups[-1][0] + 1
# do backup
newpath = os.path.join(dir, "backup-%d.anki2" % n)
shutil.copy2(path, newpath)
shutil.copyfile(path, newpath)
# remove if over
if len(backups) + 1 > nbacks:
delete = len(backups) + 1 - nbacks

View file

@ -288,4 +288,4 @@ class UpgradeThread(QThread):
src = os.path.join(mfolder, f)
dst = os.path.join(mdir, f)
if not os.path.exists(dst):
shutil.copy2(src, dst)
shutil.copyfile(src, dst)