diff --git a/anki/exporting.py b/anki/exporting.py index f61871d6c..83beb5e4e 100644 --- a/anki/exporting.py +++ b/anki/exporting.py @@ -259,6 +259,7 @@ class AnkiPackageExporter(AnkiExporter): # tidy up intermediate files os.unlink(colfile) os.unlink(path.replace(".apkg", ".media.db")) + os.chdir(self.mediaDir) shutil.rmtree(path.replace(".apkg", ".media")) return media