mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
close deck after copy in saveas
This commit is contained in:
parent
634362dc76
commit
33257c38bc
1 changed files with 1 additions and 1 deletions
|
@ -1423,7 +1423,6 @@ Return new path, relative to media dir."""
|
|||
oldMediaDir = self.mediaDir()
|
||||
# flush old deck
|
||||
self.s.flush()
|
||||
self.close()
|
||||
# remove new deck if it exists
|
||||
try:
|
||||
os.unlink(newPath)
|
||||
|
@ -1452,6 +1451,7 @@ Return new path, relative to media dir."""
|
|||
s("insert into stats select * from old.stats")
|
||||
# detach old db and commit
|
||||
s("detach database old")
|
||||
self.close()
|
||||
newDeck.s.commit()
|
||||
newDeck.refresh()
|
||||
newDeck.rebuildQueue()
|
||||
|
|
Loading…
Reference in a new issue