Merge pull request #4261 from nschum/fix-ignore-parent

Fix .ignore file causing ignores outside the directory
This commit is contained in:
advplyr
2025-05-09 17:42:26 -05:00
committed by GitHub
2 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -242,7 +242,7 @@ module.exports.recurseFiles = async (path, relPathToReplace = null) => {
})
.filter((item) => {
// Filter out items in ignore directories
if (directoriesToIgnore.some((dir) => item.fullname.startsWith(dir))) {
if (directoriesToIgnore.some((dir) => item.fullname.startsWith(dir + '/'))) {
Logger.debug(`[fileUtils] Ignoring path in dir with .ignore "${item.fullname}"`)
return false
}