diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 10d486b95..801fe3998 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -567,6 +567,10 @@ class Config: os.makedirs(self['data_dir']) return self['data_dir'] + def ensure_wallet_dir(self): + if not os.path.isdir(self['lbryum_wallet_dir']): + os.makedirs(self['lbryum_wallet_dir']) + def get_log_filename(self): """ Return the log file for this platform. diff --git a/lbrynet/daemon/Components.py b/lbrynet/daemon/Components.py index d3de4e528..9028a55a4 100644 --- a/lbrynet/daemon/Components.py +++ b/lbrynet/daemon/Components.py @@ -290,6 +290,7 @@ class HeadersComponent(Component): @defer.inlineCallbacks def start(self): + conf.settings.ensure_wallet_dir() if not os.path.exists(self.headers_dir): os.mkdir(self.headers_dir) if os.path.exists(self.old_file): @@ -336,6 +337,7 @@ class WalletComponent(Component): @defer.inlineCallbacks def start(self): + conf.settings.ensure_wallet_dir() log.info("Starting torba wallet") storage = self.component_manager.get_component(DATABASE_COMPONENT) lbryschema.BLOCKCHAIN_NAME = conf.settings['blockchain_name']