From 0b4352d915aeb7926e8a1b4fbdad0222574540a9 Mon Sep 17 00:00:00 2001 From: hankertrix <91734413+hankertrix@users.noreply.github.com> Date: Sun, 5 Jan 2025 05:05:22 +0800 Subject: [PATCH] Fix: Fix no skip flag causing archive extraction to fail Whoops, copied and pasted the condition and didn't check. Also removed the debug print statements. Closes #8. --- init.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 491fda3..6af34e2 100644 --- a/init.lua +++ b/init.lua @@ -2320,9 +2320,6 @@ local function handle_extract(args, config) ---@type string local archive_path = archive_paths - ya.dbg(archive_path) - ya.dbg(is_archive_file(archive_path)) - -- If the archive path isn't an archive, exit the function if not is_archive_file(archive_path) then return end @@ -2379,11 +2376,11 @@ local function handle_extract(args, config) { extracted_items_url } ) - -- If the user doesn't want to skip single subdirectories on enter, - -- or one of the arguments passed is no skip, + -- If the user wants to skip single subdirectories on enter, + -- and the no skip flag is not passed if - not config.skip_single_subdirectory_on_enter - or table_pop(args, "no_skip", false) + config.skip_single_subdirectory_on_enter + and not table_pop(args, "no_skip", false) then --