mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
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
1 changed files with 1 additions and 0 deletions
|
@ -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 a new issue