mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 10:42:58 -03:00
Make Common.get_resource_path find the resource path relative to the binary, instead of using an absolute path
This commit is contained in:
parent
b9bec64e07
commit
347d6ab19f
1 changed files with 4 additions and 2 deletions
|
@ -97,8 +97,10 @@ class Common(object):
|
|||
)
|
||||
|
||||
elif self.platform == "BSD" or self.platform == "Linux":
|
||||
# Assume OnionShare is installed systemwide in Linux, since we're not running in dev mode
|
||||
prefix = os.path.join(sys.prefix, "share/onionshare")
|
||||
# Look for resources relative to the binary, so if the binary is /usr/bin/onionshare-gui and
|
||||
# the resource dir is /usr/share/onionshare, then the resource dir relative to the binary dir
|
||||
# is ../share/onionshare
|
||||
prefix = os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), "share/onionshare")
|
||||
|
||||
elif getattr(sys, "frozen", False):
|
||||
# Check if app is "frozen"
|
||||
|
|
Loading…
Add table
Reference in a new issue