Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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