Skip to content

Commit

Permalink
Set default download dir to ~/Downloads on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
alexliebowitz committed Jul 4, 2016
1 parent 6034bd3 commit e35dce5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lbrynet/lbrynet_daemon/LBRYDaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,15 @@ def __init__(self, root, wallet_type="lbrycrd"):
default_download_directory = os.path.join(os.path.expanduser("~"), 'Downloads')
self.db_dir = user_data_dir("LBRY")
else:
default_download_directory = os.getcwd()
default_download_directory = os.path.join(os.path.expanduser("~"), 'Downloads')

if os.exists(default_download_directory):
if os.isfile(default_download_directory):
# Weird, ~/Downloads is a file, not a directory. Revert to just the home dir.
default_download_directory = os.path.expanduser("~")
else:
os.makedirs(default_download_directory)

self.db_dir = os.path.join(os.path.expanduser("~"), ".lbrynet")

self.daemon_conf = os.path.join(self.db_dir, 'daemon_settings.json')
Expand Down

0 comments on commit e35dce5

Please sign in to comment.