summaryrefslogtreecommitdiff
path: root/lib/threads/catalog.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-11-18 11:12:58 +0100
committerGitHub <noreply@github.com>2024-11-18 11:12:58 +0100
commite8123b72744b81302f1d264082940b58b3695584 (patch)
tree786c9ab5b5bc35f9023f7ce40634bb38f1e3298b /lib/threads/catalog.py
parentb20ad42733ae54ffb260c0262c5689c87515eae3 (diff)
Thread catalog: fix broken path (#3281)
* thread catalog: fix broken path * apply threadlist: use wxpython to also include custom lists * apply_palette: save last choice
Diffstat (limited to 'lib/threads/catalog.py')
-rw-r--r--lib/threads/catalog.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/threads/catalog.py b/lib/threads/catalog.py
index 46eb90ad..886d9aa4 100644
--- a/lib/threads/catalog.py
+++ b/lib/threads/catalog.py
@@ -4,12 +4,10 @@
# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
import os
-import sys
from collections.abc import Sequence
from glob import glob
-from os.path import dirname, realpath
-from ..utils import guess_inkscape_config_path
+from ..utils import get_bundled_dir, guess_inkscape_config_path
from .palette import ThreadPalette
@@ -26,13 +24,8 @@ class _ThreadCatalog(Sequence):
2. Palette directory of inkstitch
"""
path = [os.path.join(guess_inkscape_config_path(), 'palettes')]
-
- if getattr(sys, 'frozen', None) is not None:
- inkstitch_path = os.path.join(sys._MEIPASS, "..")
- else:
- inkstitch_path = dirname(dirname(dirname(realpath(__file__))))
-
- path.append(os.path.join(inkstitch_path, 'palettes'))
+ inkstitch_path = get_bundled_dir('palettes')
+ path.append(inkstitch_path)
return path