mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
copy2->copyfile
This commit is contained in:
parent
1df641da6f
commit
fdbed4ba17
2 changed files with 2 additions and 2 deletions
|
@ -254,7 +254,7 @@ Are you sure?"""):
|
||||||
n = backups[-1][0] + 1
|
n = backups[-1][0] + 1
|
||||||
# do backup
|
# do backup
|
||||||
newpath = os.path.join(dir, "backup-%d.anki2" % n)
|
newpath = os.path.join(dir, "backup-%d.anki2" % n)
|
||||||
shutil.copy2(path, newpath)
|
shutil.copyfile(path, newpath)
|
||||||
# remove if over
|
# remove if over
|
||||||
if len(backups) + 1 > nbacks:
|
if len(backups) + 1 > nbacks:
|
||||||
delete = len(backups) + 1 - nbacks
|
delete = len(backups) + 1 - nbacks
|
||||||
|
|
|
@ -288,4 +288,4 @@ class UpgradeThread(QThread):
|
||||||
src = os.path.join(mfolder, f)
|
src = os.path.join(mfolder, f)
|
||||||
dst = os.path.join(mdir, f)
|
dst = os.path.join(mdir, f)
|
||||||
if not os.path.exists(dst):
|
if not os.path.exists(dst):
|
||||||
shutil.copy2(src, dst)
|
shutil.copyfile(src, dst)
|
||||||
|
|
Loading…
Reference in a new issue