diff --git a/lbry/lbry/conf.py b/lbry/lbry/conf.py index c9fda939f..1339be73e 100644 --- a/lbry/lbry/conf.py +++ b/lbry/lbry/conf.py @@ -630,9 +630,13 @@ class Config(CLIConfig): def get_windows_directories() -> typing.Tuple[str, str, str]: - from lbry.winpaths import get_path, FOLDERID, UserHandle # pylint: disable=import-outside-toplevel + from lbry.winpaths import get_path, FOLDERID, UserHandle, \ + PathNotFoundException # pylint: disable=import-outside-toplevel - download_dir = get_path(FOLDERID.Downloads, UserHandle.current) + try: + download_dir = get_path(FOLDERID.Downloads, UserHandle.current) + except PathNotFoundException: + download_dir = os.getcwd() # old appdata = get_path(FOLDERID.RoamingAppData, UserHandle.current) @@ -644,7 +648,6 @@ def get_windows_directories() -> typing.Tuple[str, str, str]: # new data_dir = user_data_dir('lbrynet', 'lbry') lbryum_dir = user_data_dir('lbryum', 'lbry') - download_dir = get_path(FOLDERID.Downloads, UserHandle.current) return data_dir, lbryum_dir, download_dir