mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
fix: fall back to ~/.hate_crack for config instead of cwd
When no candidate directory has hate_crack assets, config destination fell back to cwd which fails on read-only filesystems like /.
This commit is contained in:
+3
-1
@@ -130,7 +130,9 @@ def _resolve_config_destination():
|
||||
for candidate in _candidate_roots():
|
||||
if _has_hate_crack_assets(candidate):
|
||||
return candidate
|
||||
return os.getcwd()
|
||||
fallback = os.path.join(os.path.expanduser("~"), ".hate_crack")
|
||||
os.makedirs(fallback, exist_ok=True)
|
||||
return fallback
|
||||
|
||||
|
||||
def _ensure_hashfile_in_cwd(hashfile_path):
|
||||
|
||||
Reference in New Issue
Block a user