aboutsummaryrefslogtreecommitdiffstats
path: root/finder
diff options
context:
space:
mode:
authorJeff Gaston <jeffrygaston@google.com>2017-08-23 17:53:38 -0700
committerJeff Gaston <jeffrygaston@google.com>2017-08-23 17:53:41 -0700
commit821271b3b8a4f708f475dd3ae07d229f238ef549 (patch)
tree8c8e3865dc59030ee055b907bc2503611ec4616c /finder
parentef88ae2369aa9a097941bf1bff7823589ffc819f (diff)
downloadbuild_soong-821271b3b8a4f708f475dd3ae07d229f238ef549.tar.gz
build_soong-821271b3b8a4f708f475dd3ae07d229f238ef549.tar.bz2
build_soong-821271b3b8a4f708f475dd3ae07d229f238ef549.zip
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
Diffstat (limited to 'finder')
-rw-r--r--finder/finder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/finder/finder.go b/finder/finder.go
index ffda1558..2dd8e0b0 100644
--- a/finder/finder.go
+++ b/finder/finder.go
@@ -1181,7 +1181,7 @@ func (f *Finder) canIgnoreFsErr(err error) bool {
// 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