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
This commit is contained in:
parent
ef88ae2369
commit
821271b3b8
1 changed files with 1 additions and 1 deletions
|
@ -1181,7 +1181,7 @@ func (f *Finder) canIgnoreFsErr(err error) bool {
|
||||||
// Don't recognize this error
|
// Don't recognize this error
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if pathErr.Err == os.ErrPermission {
|
if os.IsPermission(pathErr) {
|
||||||
// Permission errors are ignored:
|
// Permission errors are ignored:
|
||||||
// https://issuetracker.google.com/37553659
|
// https://issuetracker.google.com/37553659
|
||||||
// https://github.com/google/kati/pull/116
|
// https://github.com/google/kati/pull/116
|
||||||
|
|
Loading…
Reference in a new issue