Handle creation of settings directory in windows
This commit is contained in:
parent
10742d7c51
commit
7bd05e9b16
1 changed files with 5 additions and 0 deletions
|
@ -171,6 +171,11 @@ class LBRYDaemon(jsonrpc.JSONRPC):
|
|||
from lbrynet.winhelpers.knownpaths import get_path, FOLDERID, UserHandle
|
||||
default_download_directory = get_path(FOLDERID.Downloads, UserHandle.current)
|
||||
self.db_dir = os.path.join(get_path(FOLDERID.RoamingAppData, UserHandle.current), "lbrynet")
|
||||
try:
|
||||
os.makedirs(self.db_dir)
|
||||
except OSError:
|
||||
if not os.path.isdir(self.db_dir):
|
||||
raise
|
||||
elif sys.platform == "darwin":
|
||||
default_download_directory = os.path.join(os.path.expanduser("~"), 'Downloads')
|
||||
self.db_dir = user_data_dir("LBRY")
|
||||
|
|
Loading…
Reference in a new issue