mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-07 06:13:03 -04:00
Only check if we are in the sys prefix but not the actual executable name as this could be renamed or wrapped
This commit is contained in:
parent
de6881acb1
commit
baba640894
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ def get_resource_path(filename):
|
||||||
systemwide, and whether regardless of platform
|
systemwide, and whether regardless of platform
|
||||||
"""
|
"""
|
||||||
p = get_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
|
# OnionShare is installed systemwide in Linux
|
||||||
resources_dir = os.path.join(sys.prefix, 'share/onionshare')
|
resources_dir = os.path.join(sys.prefix, 'share/onionshare')
|
||||||
elif getattr(sys, 'frozen', False): # Check if app is "frozen" with cx_Freeze
|
elif getattr(sys, 'frozen', False): # Check if app is "frozen" with cx_Freeze
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue