From e5aaffeaebdc125edca77809f980dae898dcf257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Trepichio?= Date: Sat, 19 Jun 2021 04:12:38 -0300 Subject: [PATCH] fix Stuck Loading issue add ULauncher V5 Extensions path (because it's different) and check if original path exists on your system otherwise use V5 path. It solves issue: #issue-782520461 https://github.com/ralcaidev/ulauncher-extension-list/issues/2#issue-782520461 --- main.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 7e8d8e7..7a5dded 100644 --- a/main.py +++ b/main.py @@ -8,7 +8,17 @@ import json import logging -EXT_DIR = os.environ["HOME"] + "/.cache/ulauncher_cache/extensions/" +ULAUNCHER_V4_EXT_DIR = os.environ["HOME"] + "/.cache/ulauncher_cache/extensions/" +ULAUNCHER_V5_EXT_DIR = os.environ["HOME"] + "/.local/share/ulauncher/extensions/" + +CHECK_V4_FOLDER = os.path.isdir(ULAUNCHER_V4_EXT_DIR) + +if not CHECK_V4_FOLDER: + # Ulauncher v5 uses a different path for its extensions + EXT_DIR = ULAUNCHER_V5_EXT_DIR +else: + EXT_DIR = ULAUNCHER_V4_EXT_DIR + log = logging.getLogger(__name__) items = []