Skip to content

Commit

Permalink
Fix: Fix no skip flag causing archive extraction to fail
Browse files Browse the repository at this point in the history
Whoops, copied and pasted the condition and didn't check.

Also removed the debug print statements.

Closes #8.
  • Loading branch information
hankertrix committed Jan 4, 2025
1 parent 7f16356 commit 0b4352d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
--

Expand Down

0 comments on commit 0b4352d

Please sign in to comment.