Apply format validation even when caching is disabled
This commit is contained in:
parent
5ab6d1ee85
commit
76b4053240
12
cmd/files.go
12
cmd/files.go
|
@ -99,8 +99,10 @@ func preparePath(path string) string {
|
||||||
return mediaPrefix + path
|
return mediaPrefix + path
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendPath(directory, path string, files *files, stats *scanStats, formats *types.Types, shouldCache bool) {
|
func appendPath(directory, path string, files *files, stats *scanStats, formats *types.Types) {
|
||||||
if shouldCache && !formats.Validate(path) {
|
if !formats.Validate(path) {
|
||||||
|
stats.filesSkipped.Add(1)
|
||||||
|
|
||||||
return
|
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 {
|
func appendPaths(path string, files *files, filters *filters, stats *scanStats, formats *types.Types) error {
|
||||||
shouldCache := Cache && filters.isEmpty()
|
|
||||||
|
|
||||||
absolutePath, err := filepath.Abs(path)
|
absolutePath, err := filepath.Abs(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -140,7 +140,7 @@ func appendPaths(path string, files *files, filters *filters, stats *scanStats,
|
||||||
filename,
|
filename,
|
||||||
filters.included[i],
|
filters.included[i],
|
||||||
) {
|
) {
|
||||||
appendPath(directory, path, files, stats, formats, shouldCache)
|
appendPath(directory, path, files, stats, formats)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ func appendPaths(path string, files *files, filters *filters, stats *scanStats,
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
appendPath(directory, path, files, stats, formats, shouldCache)
|
appendPath(directory, path, files, stats, formats)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ReleaseVersion string = "0.85.0"
|
ReleaseVersion string = "0.85.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in New Issue