mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
a6ece012ea
commit
f97bcfb1a8
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user