mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -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()
|
oldMediaDir = self.mediaDir()
|
||||||
# flush old deck
|
# flush old deck
|
||||||
self.s.flush()
|
self.s.flush()
|
||||||
self.close()
|
|
||||||
# remove new deck if it exists
|
# remove new deck if it exists
|
||||||
try:
|
try:
|
||||||
os.unlink(newPath)
|
os.unlink(newPath)
|
||||||
|
@ -1452,6 +1451,7 @@ Return new path, relative to media dir."""
|
||||||
s("insert into stats select * from old.stats")
|
s("insert into stats select * from old.stats")
|
||||||
# detach old db and commit
|
# detach old db and commit
|
||||||
s("detach database old")
|
s("detach database old")
|
||||||
|
self.close()
|
||||||
newDeck.s.commit()
|
newDeck.s.commit()
|
||||||
newDeck.refresh()
|
newDeck.refresh()
|
||||||
newDeck.rebuildQueue()
|
newDeck.rebuildQueue()
|
||||||
|
|
Loading…
Reference in a new issue