summaryrefslogtreecommitdiff
path: root/lib/utils/paths.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-09-12 21:32:15 -0400
committerGitHub <noreply@github.com>2018-09-12 21:32:15 -0400
commit7b8af2ed5731bc10b331db2b32dbce48f60c33a9 (patch)
treeac06f38cde84e676f8aa8e91f08b71d45b9f2642 /lib/utils/paths.py
parent3fd741a1a4218b6559184aaadcde8abca178bde2 (diff)
parentd30507171b04f37871db74609c0a521325bddbd1 (diff)
Merge pull request #301 from inkstitch/lexelby/bug-fixes
bug fixes
Diffstat (limited to 'lib/utils/paths.py')
-rw-r--r--lib/utils/paths.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/utils/paths.py b/lib/utils/paths.py
index 863e8e69..6dbaf13d 100644
--- a/lib/utils/paths.py
+++ b/lib/utils/paths.py
@@ -8,3 +8,10 @@ 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))