aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxSmurf <xsmurf@users.noreply.github.com>2016-09-28 17:24:28 +0000
committerxSmurf <xsmurf@users.noreply.github.com>2016-09-28 17:24:28 +0000
commit4f464aaf2c84fc88d330ad31f1276bdc24b2b3ab (patch)
tree00dc32f3ae4ea78b4875861caac01f07fedf3e66
parent94f26ea83da886e943ea830a7874e4f0d080d67d (diff)
downloadonionshare-4f464aaf2c84fc88d330ad31f1276bdc24b2b3ab.tar.gz
onionshare-4f464aaf2c84fc88d330ad31f1276bdc24b2b3ab.zip
Only check if we are in the sys prefix but not the actual executable name as this could be renamed or wrapped
-rw-r--r--onionshare/helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/onionshare/helpers.py b/onionshare/helpers.py
index aaa1c999..33a46ce7 100644
--- a/onionshare/helpers.py
+++ b/onionshare/helpers.py
@@ -34,7 +34,7 @@ def get_resource_path(filename):
systemwide, and whether regardless of platform
"""
p = get_platform()
- if p == 'Linux' and sys.argv and sys.argv[0].startswith('/usr/bin/onionshare'):
+ if p == 'Linux' and sys.argv and sys.argv[0].startswith(sys.prefix):
# OnionShare is installed systemwide in Linux
resources_dir = os.path.join(sys.prefix, 'share/onionshare')
elif getattr(sys, 'frozen', False): # Check if app is "frozen" with cx_Freeze