Added ELECTRUMDIR env variable (#5543)
Simple way for allowing users to change localization of Electrum directory from ~/.electrum to somewhere else
This commit is contained in:
committed by
GitHub
parent
2927478192
commit
c121230706
@@ -566,7 +566,9 @@ def xor_bytes(a: bytes, b: bytes) -> bytes:
|
|||||||
|
|
||||||
|
|
||||||
def user_dir():
|
def user_dir():
|
||||||
if 'ANDROID_DATA' in os.environ:
|
if "ELECTRUMDIR" in os.environ:
|
||||||
|
return os.environ["ELECTRUMDIR"]
|
||||||
|
elif 'ANDROID_DATA' in os.environ:
|
||||||
return android_data_dir()
|
return android_data_dir()
|
||||||
elif os.name == 'posix':
|
elif os.name == 'posix':
|
||||||
return os.path.join(os.environ["HOME"], ".electrum")
|
return os.path.join(os.environ["HOME"], ".electrum")
|
||||||
|
|||||||
Reference in New Issue
Block a user