summaryrefslogtreecommitdiff
path: root/onionshare
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-11-27 15:41:37 -0800
committerMicah Lee <micah@micahflee.com>2019-11-27 15:41:37 -0800
commite253b065492ddc68df8ea43ba8a9458a60f45ecc (patch)
tree31b43088ba5b48401d22cd7deb45b86942cd7ea1 /onionshare
parent347d6ab19f911b12b6274f365cf9b2a6b122f37b (diff)
downloadonionshare-e253b065492ddc68df8ea43ba8a9458a60f45ecc.tar.gz
onionshare-e253b065492ddc68df8ea43ba8a9458a60f45ecc.zip
Update tor paths to use paths relative to the binary, instead of absolute paths
Diffstat (limited to 'onionshare')
-rw-r--r--onionshare/common.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/onionshare/common.py b/onionshare/common.py
index 48f52098..e447ea34 100644
--- a/onionshare/common.py
+++ b/onionshare/common.py
@@ -114,10 +114,11 @@ class Common(object):
def get_tor_paths(self):
if self.platform == "Linux":
- tor_path = "/usr/bin/tor"
- tor_geo_ip_file_path = "/usr/share/tor/geoip"
- tor_geo_ipv6_file_path = "/usr/share/tor/geoip6"
- obfs4proxy_file_path = "/usr/bin/obfs4proxy"
+ prefix = os.path.dirname(os.path.dirname(sys.argv[0]))
+ tor_path = os.path.join(prefix, "bin/tor")
+ tor_geo_ip_file_path = os.path.join(prefix, "share/tor/geoip")
+ tor_geo_ipv6_file_path = os.path.join(prefix, "share/tor/geoip6")
+ obfs4proxy_file_path = os.path.join(prefix, "bin/obfs4proxy")
elif self.platform == "Windows":
base_path = os.path.join(
os.path.dirname(os.path.dirname(self.get_resource_path(""))), "tor"