Skip to content

Conversation

@SOberhoff
Copy link
Contributor

The complete callback in recursive_delete and recursive_copy checks err instead of err2, but err is always nil inside the elseif entries branch. This silently ignores child operation errors, causing misleading "directory not empty" failures.

The correct pattern is already used elsewhere in the codebase:

  • recursive_move (line 362)
  • trash/windows.lua (line 336)

The `complete` callback checks `err` instead of `err2`, but `err` is
always nil inside the `elseif entries` branch. This silently ignores
child operation errors, causing misleading "directory not empty" failures.
@github-actions github-actions bot requested a review from stevearc January 10, 2026 17:19
@stevearc
Copy link
Owner

Good find, thanks for the fix!

@stevearc stevearc merged commit d278dc4 into stevearc:master Jan 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants