mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
don't try to remove tmp folder if it's already been removed
This commit is contained in:
parent
ac57174fc0
commit
a2c9b160ca
1 changed files with 2 additions and 1 deletions
|
@ -296,7 +296,8 @@ def tmpdir():
|
|||
global _tmpdir
|
||||
if not _tmpdir:
|
||||
def cleanup():
|
||||
shutil.rmtree(_tmpdir)
|
||||
if os.path.exists(_tmpdir):
|
||||
shutil.rmtree(_tmpdir)
|
||||
import atexit
|
||||
atexit.register(cleanup)
|
||||
_tmpdir = os.path.join(tempfile.gettempdir(), "anki_temp")
|
||||
|
|
Loading…
Reference in a new issue