only compare deck paths if path available

This commit is contained in:
Damien Elmes 2009-01-22 04:10:25 +09:00
parent 94f36ac4f2
commit f8c80dc03d

View file

@ -853,8 +853,9 @@ To upgrade an old deck, download Anki 0.9.8.7."""))
return
if not file.lower().endswith(".anki"):
file += ".anki"
if os.path.abspath(file) == os.path.abspath(self.deck.path):
return self.onSave()
if self.deck.path:
if os.path.abspath(file) == os.path.abspath(self.deck.path):
return self.onSave()
if os.path.exists(file):
# check for existence after extension
if not ui.utils.askUser(