From 59b3e6793385ec122222a509c492708fb1e503d8 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Mon, 24 Jun 2024 18:14:28 -0400 Subject: [PATCH] use user directory for extra manuals --- index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.py b/index.py index 3be1257..126d8f9 100644 --- a/index.py +++ b/index.py @@ -32,10 +32,10 @@ # Has to be same install method as this one. ;) # Hangs if you've got recursive links in plugin dirs?? STRIP_VARIANTS = r"_?(32|64)?(el|eb|be|_le|_eb|_be|l)?$" -PLUGIN_DIR = Path(__file__).parent.parent.absolute() +MANUALS_DIR = Path(bn.user_directory()) / "manuals" def find_manuals_in_siblings(arch_guess): - return glob.glob(f"{PLUGIN_DIR}/*{arch_guess}*/**/*.pdf", recursive=True) + return glob.glob(f"{MANUALS_DIR}/*{arch_guess}*/**/*.pdf", recursive=True) manuals = {} # main cache, acceptable RAM use def go(instr, action="Search", bv=None, arch=None):