From fdbed4ba178a4fde320c521f522b5e0940b2d231 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 22 Apr 2012 07:32:14 +0900 Subject: [PATCH] copy2->copyfile --- aqt/main.py | 2 +- aqt/upgrade.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/main.py b/aqt/main.py index 27b31a10d..e5b5bd5ac 100755 --- a/aqt/main.py +++ b/aqt/main.py @@ -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 diff --git a/aqt/upgrade.py b/aqt/upgrade.py index 728a39531..8faec3598 100644 --- a/aqt/upgrade.py +++ b/aqt/upgrade.py @@ -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)