From f8c80dc03db486bce25f9f9f7bbce2e6b51d8701 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 22 Jan 2009 04:10:25 +0900 Subject: [PATCH] only compare deck paths if path available --- ankiqt/ui/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 7c0488e31..0398a8192 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -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(