mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
make sure temp folder hasn't been deleted since creation
This commit is contained in:
parent
d659d9cff7
commit
72b4148127
1 changed files with 4 additions and 3 deletions
|
@ -292,9 +292,10 @@ def tmpdir():
|
|||
shutil.rmtree(_tmpdir)
|
||||
import atexit
|
||||
atexit.register(cleanup)
|
||||
_tmpdir = unicode(os.path.join(tempfile.gettempdir(), "anki_temp"), sys.getfilesystemencoding())
|
||||
if not os.path.exists(_tmpdir):
|
||||
os.mkdir(_tmpdir)
|
||||
_tmpdir = unicode(os.path.join(tempfile.gettempdir(), "anki_temp"), \
|
||||
sys.getfilesystemencoding())
|
||||
if not os.path.exists(_tmpdir):
|
||||
os.mkdir(_tmpdir)
|
||||
return _tmpdir
|
||||
|
||||
def tmpfile(prefix="", suffix=""):
|
||||
|
|
Loading…
Reference in a new issue