Apply format validation even when caching is disabled

This commit is contained in:
Seednode 2023-09-14 22:39:51 -05:00
parent 5ab6d1ee85
commit 76b4053240
2 changed files with 7 additions and 7 deletions

View File

@ -99,8 +99,10 @@ func preparePath(path string) string {
return mediaPrefix + path
}
func appendPath(directory, path string, files *files, stats *scanStats, formats *types.Types, shouldCache bool) {
if shouldCache && !formats.Validate(path) {
func appendPath(directory, path string, files *files, stats *scanStats, formats *types.Types) {
if !formats.Validate(path) {
stats.filesSkipped.Add(1)
return
}
@ -110,8 +112,6 @@ func appendPath(directory, path string, files *files, stats *scanStats, formats
}
func appendPaths(path string, files *files, filters *filters, stats *scanStats, formats *types.Types) error {
shouldCache := Cache && filters.isEmpty()
absolutePath, err := filepath.Abs(path)
if err != nil {
return err
@ -140,7 +140,7 @@ func appendPaths(path string, files *files, filters *filters, stats *scanStats,
filename,
filters.included[i],
) {
appendPath(directory, path, files, stats, formats, shouldCache)
appendPath(directory, path, files, stats, formats)
return nil
}
@ -151,7 +151,7 @@ func appendPaths(path string, files *files, filters *filters, stats *scanStats,
return nil
}
appendPath(directory, path, files, stats, formats, shouldCache)
appendPath(directory, path, files, stats, formats)
return nil
}

View File

@ -11,7 +11,7 @@ import (
)
const (
ReleaseVersion string = "0.85.0"
ReleaseVersion string = "0.85.1"
)
var (