This commit is contained in:
Kovid Goyal 2019-05-15 16:54:45 +05:30
parent 2896bb3571
commit 65a0eaeac2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -6,10 +6,10 @@ Provides platform independent temporary files that persist even after
being closed.
"""
import tempfile, os, atexit
from polyglot.builtins import map
from polyglot.builtins import map, getenv
from calibre.constants import (__version__, __appname__, filesystem_encoding,
get_unicode_windows_env_var, iswindows, get_windows_temp_path, isosx, ispy3)
iswindows, get_windows_temp_path, isosx, ispy3)
def cleanup(path):
@ -102,7 +102,7 @@ def base_dir():
else:
base = os.environ.get('CALIBRE_TEMP_DIR', None)
if base is not None and iswindows:
base = get_unicode_windows_env_var('CALIBRE_TEMP_DIR')
base = getenv('CALIBRE_TEMP_DIR')
prefix = app_prefix(u'tmp_')
if base is None:
if iswindows: