V2 Ignore Directories plus trailing slash

Updated ignore dirs feature to allow trailing slashes in
.photoviewignore file(s).

Signed-off-by: Kjeldgaard <Kjeldgaard@users.noreply.github.com>
This commit is contained in:
Kjeldgaard
2021-02-23 20:57:05 +01:00
parent 7ab9a12e43
commit 222a288077

View File

@@ -101,7 +101,7 @@ func findAlbumsForUser(db *gorm.DB, user *models.User, album_cache *AlbumScanner
// Skip this dir if in ignore list
ignorePaths := ignore.CompileIgnoreLines(albumIgnore...)
if (ignorePaths.MatchesPath(albumPath)) {
if (ignorePaths.MatchesPath(albumPath + "/")) {
log.Printf("Skip, directroy %s is in ignore file", albumPath)
continue
}