Try harder to recover on systems where people run temp file cleaners that delete the temp files of running programs

This commit is contained in:
Kovid Goyal 2011-05-22 10:46:50 -06:00
parent a6ece012ea
commit f97bcfb1a8

View File

@ -29,6 +29,10 @@ def remove_dir(x):
def base_dir():
global _base_dir
if _base_dir is not None and not os.path.exists(_base_dir):
# Some people seem to think that running temp file cleaners that
# delete the temp dirs of running programs is a good idea!
_base_dir = None
if _base_dir is None:
td = os.environ.get('CALIBRE_WORKER_TEMP_DIR', None)
if td is not None: