summaryrefslogtreecommitdiff
path: root/lib/utils/paths.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/paths.py')
-rw-r--r--lib/utils/paths.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/utils/paths.py b/lib/utils/paths.py
index 863e8e69..0da8a154 100644
--- a/lib/utils/paths.py
+++ b/lib/utils/paths.py
@@ -8,3 +8,9 @@ def get_bundled_dir(name):
return realpath(os.path.join(sys._MEIPASS, "..", name))
else:
return realpath(os.path.join(dirname(realpath(__file__)), '..', '..', name))
+
+def get_resource_dir(name):
+ if getattr(sys, 'frozen', None) is not None:
+ return realpath(os.path.join(sys._MEIPASS, name))
+ else:
+ return realpath(os.path.join(dirname(realpath(__file__)), '..', '..', name))