mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #8111 (Feature request: Ability to choose working temp folder)
This commit is contained in:
parent
6931d463d4
commit
6055869130
@ -21,6 +21,7 @@ Environment variables
|
|||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
* ``CALIBRE_CONFIG_DIRECTORY`` - sets the directory where configuration files are stored/read.
|
* ``CALIBRE_CONFIG_DIRECTORY`` - sets the directory where configuration files are stored/read.
|
||||||
|
* ``CALIBRE_TEMP_DIR`` - sets the temporary directory used by calibre
|
||||||
* ``CALIBRE_OVERRIDE_DATABASE_PATH`` - allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder. Useful if your library folder is on a networked drive that does not support file locking.
|
* ``CALIBRE_OVERRIDE_DATABASE_PATH`` - allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder. Useful if your library folder is on a networked drive that does not support file locking.
|
||||||
* ``CALIBRE_DEVELOP_FROM`` - Used to run from a calibre development environment. See :ref:`develop`.
|
* ``CALIBRE_DEVELOP_FROM`` - Used to run from a calibre development environment. See :ref:`develop`.
|
||||||
* ``CALIBRE_OVERRIDE_LANG`` - Used to force the language used by the interface (ISO 639 language code)
|
* ``CALIBRE_OVERRIDE_LANG`` - Used to force the language used by the interface (ISO 639 language code)
|
||||||
|
@ -40,7 +40,7 @@ def base_dir():
|
|||||||
_base_dir = td
|
_base_dir = td
|
||||||
else:
|
else:
|
||||||
_base_dir = tempfile.mkdtemp(prefix='%s_%s_tmp_'%(__appname__,
|
_base_dir = tempfile.mkdtemp(prefix='%s_%s_tmp_'%(__appname__,
|
||||||
__version__))
|
__version__), dir=os.environ.get('CALIBRE_TEMP_DIR', None))
|
||||||
atexit.register(remove_dir, _base_dir)
|
atexit.register(remove_dir, _base_dir)
|
||||||
return _base_dir
|
return _base_dir
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user