change out of temp media folder before deleting it
In some cases, not doing so could cause a "this file is being used by another process" error.
This commit is contained in:
parent
186641ad8c
commit
a261f15269
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user