diff --git a/electrum/util.py b/electrum/util.py index b0f0de7d3..829132127 100644 --- a/electrum/util.py +++ b/electrum/util.py @@ -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")