From ae421e29b0d2f3e620cc5036abd8ebb9e1af8d17 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 31 Jul 2025 16:11:10 -0300 Subject: [PATCH] refactor: simplify --- internal/fsext/fileutil.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 } }