diff --git a/internal/fsext/fileutil.go b/internal/fsext/fileutil.go index a5b23c5bc81e1ac6e9019318aadbe14bd20cbb7e..4a64b96859f5b9da1122816e1c2685b769c714c1 100644 --- a/internal/fsext/fileutil.go +++ b/internal/fsext/fileutil.go @@ -143,19 +143,17 @@ func (w *FastGlobWalker) shouldSkip(path string) bool { relPath, err := filepath.Rel(w.rootPath, path) if err != nil { - relPath = path + return false } - // Check gitignore patterns if available if w.gitignore != nil { - if err == nil && w.gitignore.MatchesPath(relPath) { + if w.gitignore.MatchesPath(relPath) { return true } } - // Check crushignore patterns if available if w.crushignore != nil { - if err == nil && w.crushignore.MatchesPath(relPath) { + if w.crushignore.MatchesPath(relPath) { return true } }