From 6c3c950fb2ecd91e2000c2dad08ef6da8030ccfb Mon Sep 17 00:00:00 2001 From: t Date: Sun, 22 Mar 2026 23:18:32 -0600 Subject: [PATCH] Adding --- lora_iterator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lora_iterator.js b/lora_iterator.js index 1b5f08e..d9fdef2 100644 --- a/lora_iterator.js +++ b/lora_iterator.js @@ -17,7 +17,11 @@ app.registerExtension({ }, get: () => { if (dirWidget.value === "[All]") return fullLoraList; - return fullLoraList.filter(x => x.startsWith(dirWidget.value + "/") || x.startsWith(dirWidget.value + "\\")); + // Compare only the parent folder of each lora path + return fullLoraList.filter(x => { + const parts = x.split(/[\\/]/); + return parts.length > 1 && parts[0] === dirWidget.value; + }); } }); }