mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix for portable version: use its own directory
This commit is contained in:
parent
325efed9ac
commit
f340f08a6e
2 changed files with 9 additions and 4 deletions
2
electrum
2
electrum
|
@ -118,7 +118,7 @@ if __name__ == '__main__':
|
||||||
parser = arg_parser()
|
parser = arg_parser()
|
||||||
options, args = parser.parse_args()
|
options, args = parser.parse_args()
|
||||||
if options.portable and options.wallet_path is None:
|
if options.portable and options.wallet_path is None:
|
||||||
options.wallet_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum.dat')
|
options.electrum_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum_data')
|
||||||
|
|
||||||
# config is an object passed to the various constructors (wallet, interface, gui)
|
# config is an object passed to the various constructors (wallet, interface, gui)
|
||||||
if is_android:
|
if is_android:
|
||||||
|
|
|
@ -22,6 +22,9 @@ a SimpleConfig instance then reads the wallet file.
|
||||||
if options.get('portable') is not True:
|
if options.get('portable') is not True:
|
||||||
self.read_system_config()
|
self.read_system_config()
|
||||||
|
|
||||||
|
# command-line options
|
||||||
|
self.options_config = options
|
||||||
|
|
||||||
# init path
|
# init path
|
||||||
self.init_path()
|
self.init_path()
|
||||||
|
|
||||||
|
@ -30,15 +33,17 @@ a SimpleConfig instance then reads the wallet file.
|
||||||
if options.get('portable') == False:
|
if options.get('portable') == False:
|
||||||
self.read_user_config()
|
self.read_user_config()
|
||||||
|
|
||||||
# command-line options
|
|
||||||
self.options_config = options
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def init_path(self):
|
def init_path(self):
|
||||||
|
|
||||||
|
# Read electrum path in the command line configuration
|
||||||
|
self.path = self.options_config.get('electrum_path')
|
||||||
|
|
||||||
# Read electrum path in the system configuration
|
# Read electrum path in the system configuration
|
||||||
|
if self.path is None:
|
||||||
self.path = self.system_config.get('electrum_path')
|
self.path = self.system_config.get('electrum_path')
|
||||||
|
|
||||||
# If not set, use the user's default data directory.
|
# If not set, use the user's default data directory.
|
||||||
|
|
Loading…
Add table
Reference in a new issue