mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
oops
This commit is contained in:
parent
2896bb3571
commit
65a0eaeac2
@ -6,10 +6,10 @@ Provides platform independent temporary files that persist even after
|
|||||||
being closed.
|
being closed.
|
||||||
"""
|
"""
|
||||||
import tempfile, os, atexit
|
import tempfile, os, atexit
|
||||||
from polyglot.builtins import map
|
from polyglot.builtins import map, getenv
|
||||||
|
|
||||||
from calibre.constants import (__version__, __appname__, filesystem_encoding,
|
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):
|
def cleanup(path):
|
||||||
@ -102,7 +102,7 @@ def base_dir():
|
|||||||
else:
|
else:
|
||||||
base = os.environ.get('CALIBRE_TEMP_DIR', None)
|
base = os.environ.get('CALIBRE_TEMP_DIR', None)
|
||||||
if base is not None and iswindows:
|
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_')
|
prefix = app_prefix(u'tmp_')
|
||||||
if base is None:
|
if base is None:
|
||||||
if iswindows:
|
if iswindows:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user