From 76b4053240be22a5571fdd039209915436a6ee65 Mon Sep 17 00:00:00 2001 From: Seednode Date: Thu, 14 Sep 2023 22:39:51 -0500 Subject: [PATCH] Apply format validation even when caching is disabled --- cmd/files.go | 12 ++++++------ cmd/root.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/files.go b/cmd/files.go index 2a7987c..9b3cde8 100644 --- a/cmd/files.go +++ b/cmd/files.go @@ -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 } diff --git a/cmd/root.go b/cmd/root.go index 1476fce..9f191ce 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -11,7 +11,7 @@ import ( ) const ( - ReleaseVersion string = "0.85.0" + ReleaseVersion string = "0.85.1" ) var (