fix android detection
This commit is contained in:
parent
ec42483b6b
commit
4db5052cc6
|
@ -243,14 +243,14 @@ def get_headers_path(config):
|
||||||
return os.path.join(config.path, 'blockchain_headers')
|
return os.path.join(config.path, 'blockchain_headers')
|
||||||
|
|
||||||
def user_dir():
|
def user_dir():
|
||||||
if os.name == 'posix':
|
if 'ANDROID_DATA' in os.environ:
|
||||||
|
return android_check_data_dir()
|
||||||
|
elif os.name == 'posix':
|
||||||
return os.path.join(os.environ["HOME"], ".electrum")
|
return os.path.join(os.environ["HOME"], ".electrum")
|
||||||
elif "APPDATA" in os.environ:
|
elif "APPDATA" in os.environ:
|
||||||
return os.path.join(os.environ["APPDATA"], "Electrum")
|
return os.path.join(os.environ["APPDATA"], "Electrum")
|
||||||
elif "LOCALAPPDATA" in os.environ:
|
elif "LOCALAPPDATA" in os.environ:
|
||||||
return os.path.join(os.environ["LOCALAPPDATA"], "Electrum")
|
return os.path.join(os.environ["LOCALAPPDATA"], "Electrum")
|
||||||
elif 'ANDROID_DATA' in os.environ:
|
|
||||||
return android_check_data_dir()
|
|
||||||
else:
|
else:
|
||||||
#raise Exception("No home directory found in environment variables.")
|
#raise Exception("No home directory found in environment variables.")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue