diff options
author | Micah Lee <micah@micahflee.com> | 2018-11-25 17:34:06 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2018-11-25 17:34:06 -0800 |
commit | 250dbf91993a4a90a19c33cbff88520ac8660753 (patch) | |
tree | ebcec5ad1eb237faa103666f722fc44db3556428 | |
parent | 29d2518911e79f13a5b359f1a42919634ec906e7 (diff) | |
download | onionshare-250dbf91993a4a90a19c33cbff88520ac8660753.tar.gz onionshare-250dbf91993a4a90a19c33cbff88520ac8660753.zip |
Make sure downloads_dir exists after loading settings
-rw-r--r-- | onionshare/settings.py | 6 |
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. |