mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-30 22:59:37 +02:00
Fix .ignore file causing ignores outside the directory
The file "a/.ignore" should only cause the directory "a" to be ignored. However, it also ignores all files starting with "a". After this fix, it will only ignore paths starting with "a/".
This commit is contained in:
parent
45987ffd63
commit
3cc527484d
2 changed files with 14 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue