fix: Update rules.go

Signed-off-by: Ronan Takizawa <71115970+ronantakizawa@users.noreply.github.com>
pull/13293/head
Ronan Takizawa 1 year ago committed by GitHub
parent 94924f1ea5
commit e37e430ee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -100,16 +100,6 @@ func (r *Rules) Ignore(path string, fi os.FileInfo) bool {
if path == "." || path == "./" {
return false
}
// Handle broken symlinks
if fi.Mode()&os.ModeSymlink != 0 {
_, err := filepath.EvalSymlinks(path)
if err != nil {
log.Printf("Skipping broken symlink: %s", path)
return true // Treat broken symlink as ignored
}
}
for _, p := range r.patterns {
if p.match == nil {
log.Printf("ignore: no matcher supplied for %q", p.raw)
@ -137,7 +127,6 @@ func (r *Rules) Ignore(path string, fi os.FileInfo) bool {
return true
}
}
return false
}

Loading…
Cancel
Save