From 25aa35799bb30dcefe63703f798d5191e42a583d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 3 Feb 2011 00:11:40 +0900 Subject: [PATCH] copy media from exporting deck instead of duplicating & deleting --- ankiqt/ui/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 76d6f4a96..6576c4ed1 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -2096,7 +2096,7 @@ Please give your deck a name:""")) d.s.statement("vacuum") self.deck.updateProgress() nfacts = d.factCount - mdir = d.mediaDir() + mdir = self.deck.mediaDir() d.close() dir = os.path.dirname(path) zippath = os.path.join(dir, "shared-%d.zip" % time.time()) @@ -2123,7 +2123,6 @@ it to your friends. zip.write(os.path.join(mdir, f), os.path.join("shared.media/", f)) os.chdir(pwd) - shutil.rmtree(mdir) os.chdir(pwd) self.deck.updateProgress() zip.close()