- edited description
Instant always creates ~/.instant folder, even when INSTANT_CACHE_DIR and INSTANT_ERROR_DIR are set
Issue #13
resolved
In paths.py creating the temp dir uses a checksum based on calling get_instant_dir() which creates ~/.instant
This is undesirable if the user has no access to $HOME for some reason (as happened to me on a system today). The patch below should fix it.
--- a/instant/paths.py
+++ b/instant/paths.py
@@ -19,7 +19,7 @@ def get_temp_dir():
global _tmp_dir
if _tmp_dir is None:
datestring = "%d-%d-%d-%02d-%02d" % time.localtime()[:5]
- suffix = datestring + "_instant_" + compute_checksum(get_instant_dir())
+ suffix = datestring + "_instant_" + compute_checksum(get_default_cache_dir())
_tmp_dir = tempfile.mkdtemp(suffix)
instant_debug("Created temp directory '%s'." % _tmp_dir)
return _tmp_dir
Comments (3)
-
reporter -
Related bug in DOLFIN: https://bugs.launchpad.net/dolfin/+bug/1102197 (failure on system without a $HOME directory).
-
- changed status to resolved
Fixed by: 1158c53e25b8a777cd0e8828866ee2f385684e14
- Log in to comment