aboutsummaryrefslogtreecommitdiff
path: root/onionshare/settings.py
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2018-11-25 17:17:56 -0800
committerMicah Lee <micah@micahflee.com>2018-11-25 17:17:56 -0800
commit49340321445e9b5dcbcded52f72dd16b02dc7a39 (patch)
tree80f205d1a94ac8ede351a3faf2a209cef0cb251d /onionshare/settings.py
parent66e50c96b8f63e82edd1bc0a69cc6f62f3ec1728 (diff)
downloadonionshare-49340321445e9b5dcbcded52f72dd16b02dc7a39.tar.gz
onionshare-49340321445e9b5dcbcded52f72dd16b02dc7a39.zip
Make tor data dir always be a tempdir inside OnionShare's data dir
Diffstat (limited to 'onionshare/settings.py')
-rw-r--r--onionshare/settings.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/onionshare/settings.py b/onionshare/settings.py
index 4a056989..058557e9 100644
--- a/onionshare/settings.py
+++ b/onionshare/settings.py
@@ -120,19 +120,7 @@ class Settings(object):
"""
Returns the path of the settings file.
"""
- p = platform.system()
- if p == 'Windows':
- try:
- appdata = os.environ['APPDATA']
- return '{}\\OnionShare\\onionshare.json'.format(appdata)
- except:
- # If for some reason we don't have the 'APPDATA' environment variable
- # (like running tests in Linux while pretending to be in Windows)
- return os.path.expanduser('~/.config/onionshare/onionshare.json')
- elif p == 'Darwin':
- return os.path.expanduser('~/Library/Application Support/OnionShare/onionshare.json')
- else:
- return os.path.expanduser('~/.config/onionshare/onionshare.json')
+ return os.path.join(self.common.build_data_dir(), 'onionshare.json')
def build_default_downloads_dir(self):
"""