mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 08:51:32 +00:00
fix #4159
This commit is contained in:
parent
a00439b6f8
commit
c0a42b756b
2 changed files with 14 additions and 2 deletions
|
@ -396,7 +396,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
self.show_warning(msg, title=_('Information'))
|
self.show_warning(msg, title=_('Information'))
|
||||||
|
|
||||||
def open_wallet(self):
|
def open_wallet(self):
|
||||||
wallet_folder = self.get_wallet_folder()
|
try:
|
||||||
|
wallet_folder = self.get_wallet_folder()
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
self.show_error(str(e))
|
||||||
|
return
|
||||||
filename, __ = QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder)
|
filename, __ = QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder)
|
||||||
if not filename:
|
if not filename:
|
||||||
return
|
return
|
||||||
|
@ -440,7 +444,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
return os.path.dirname(os.path.abspath(self.config.get_wallet_path()))
|
return os.path.dirname(os.path.abspath(self.config.get_wallet_path()))
|
||||||
|
|
||||||
def new_wallet(self):
|
def new_wallet(self):
|
||||||
wallet_folder = self.get_wallet_folder()
|
try:
|
||||||
|
wallet_folder = self.get_wallet_folder()
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
self.show_error(str(e))
|
||||||
|
return
|
||||||
i = 1
|
i = 1
|
||||||
while True:
|
while True:
|
||||||
filename = "wallet_%d" % i
|
filename = "wallet_%d" % i
|
||||||
|
|
|
@ -233,6 +233,10 @@ class SimpleConfig(PrintError):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
# default path
|
# default path
|
||||||
|
if not os.path.exists(self.path):
|
||||||
|
raise FileNotFoundError(
|
||||||
|
_('Electrum datadir does not exist. Was it deleted while running?') + '\n' +
|
||||||
|
_('Should be at {}').format(self.path))
|
||||||
dirpath = os.path.join(self.path, "wallets")
|
dirpath = os.path.join(self.path, "wallets")
|
||||||
if not os.path.exists(dirpath):
|
if not os.path.exists(dirpath):
|
||||||
if os.path.islink(dirpath):
|
if os.path.islink(dirpath):
|
||||||
|
|
Loading…
Add table
Reference in a new issue