Skip to content

fix(scandir): respect gitignore only if under its scope in case of scanning multiple paths#614

Open
Pre-Z wants to merge 1 commit intonvim-lua:masterfrom
Pre-Z:fix/gitignore_on_mixed_paths
Open

fix(scandir): respect gitignore only if under its scope in case of scanning multiple paths#614
Pre-Z wants to merge 1 commit intonvim-lua:masterfrom
Pre-Z:fix/gitignore_on_mixed_paths

Conversation

@Pre-Z
Copy link

@Pre-Z Pre-Z commented Aug 6, 2024

This PR fixes the following scenario:

  • respect_gitignore is true
  • path argument to scan is a list containing a project directory having a gitignore file and other paths outside of this project directory, e.g.:
    • /tmp/some_project_dir (this is the current directory too, having the gitignore file)
    • /other_path_1/subdir_1
    • /other_path_2/subdir_2

If scan_dir runs, it tries to match the gitignore rule of the current working directory for the /other_path_{1,2} paths and throws scandir.lua:49: attempt to index a nil value.

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.

1 participant