diff options
Diffstat (limited to 'desktop/src/onionshare/gui_common.py')
-rw-r--r-- | desktop/src/onionshare/gui_common.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/desktop/src/onionshare/gui_common.py b/desktop/src/onionshare/gui_common.py index a51e2641..7a32f8ec 100644 --- a/desktop/src/onionshare/gui_common.py +++ b/desktop/src/onionshare/gui_common.py @@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. import os import inspect import shutil +from pkg_resources import resource_filename from . import strings from onionshare_cli.onion import Onion @@ -367,8 +368,4 @@ class GuiCommon: """ Returns the absolute path of a resource """ - resources_path = os.path.join( - os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))), - "resources", - ) - return os.path.join(resources_path, filename) + return resource_filename("onionshare", os.path.join("resources", filename)) |