summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2018-11-25 17:34:06 -0800
committerMicah Lee <micah@micahflee.com>2018-11-25 17:34:06 -0800
commit250dbf91993a4a90a19c33cbff88520ac8660753 (patch)
treeebcec5ad1eb237faa103666f722fc44db3556428
parent29d2518911e79f13a5b359f1a42919634ec906e7 (diff)
downloadonionshare-250dbf91993a4a90a19c33cbff88520ac8660753.tar.gz
onionshare-250dbf91993a4a90a19c33cbff88520ac8660753.zip
Make sure downloads_dir exists after loading settings
-rw-r--r--onionshare/settings.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/onionshare/settings.py b/onionshare/settings.py
index 058557e9..41fcc536 100644
--- a/onionshare/settings.py
+++ b/onionshare/settings.py
@@ -146,6 +146,12 @@ class Settings(object):
except:
pass
+ # Make sure downloads_dir exists
+ try:
+ os.makedirs(self.get('downloads_dir'), exist_ok=True)
+ except:
+ pass
+
def save(self):
"""
Save settings to file.