Fix the Finder's ability to ignore permission errors
It turns out the os was returning a different permissions error than
os.ErrPermission. Fortunately we can just use os.IsPermission().
Bug: 62455338
Test: mkdir not-permitted && chmod 000 not-permitted && m nothing
Change-Id: Ieb1653b9687ffdaae83184dcdcd4166ddb6a4613
diff --git a/finder/finder.go b/finder/finder.go
index ffda155..2dd8e0b 100644
--- a/finder/finder.go
+++ b/finder/finder.go
@@ -1181,7 +1181,7 @@
// Don't recognize this error
return false
}
- if pathErr.Err == os.ErrPermission {
+ if os.IsPermission(pathErr) {
// Permission errors are ignored:
// https://issuetracker.google.com/37553659
// https://github.com/google/kati/pull/116