Merge pull request #1287 from lkiesow/subpath-detection

Fix Sub-path Detection
This commit is contained in:
advplyr 2022-12-18 15:48:28 -06:00 committed by GitHub
commit 17cce9c914
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -614,7 +614,7 @@ class Scanner {
}
// Check if a library item is a subdirectory of this dir
var childItem = this.db.libraryItems.find(li => li.path.startsWith(fullPath))
var childItem = this.db.libraryItems.find(li => (li.path + '/').startsWith(fullPath + '/'))
if (childItem) {
Logger.warn(`[Scanner] Files were modified in a parent directory of a library item "${childItem.media.metadata.title}" - ignoring`)
itemGroupingResults[itemDir] = ScanResult.NOTHING