1
0

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:
Jakub Łukasiewicz
2020-02-25 16:28:53 +01:00
committed by GitHub
parent 2927478192
commit c121230706

View File

@@ -566,7 +566,9 @@ def xor_bytes(a: bytes, b: bytes) -> bytes:
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()
elif os.name == 'posix':
return os.path.join(os.environ["HOME"], ".electrum")