aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/spf13/afero/cacheOnReadFs.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-10-18 13:15:14 +0100
committerNiall Sheridan <niall@intercom.io>2017-10-18 13:25:46 +0100
commit7b320119ba532fd409ec7dade7ad02011c309599 (patch)
treea39860f35b55e6cc499f8f5bfa969138c5dd6b73 /vendor/github.com/spf13/afero/cacheOnReadFs.go
parent7c99874c7a3e7a89716f3ee0cdf696532e35ae35 (diff)
Update dependencies
Diffstat (limited to 'vendor/github.com/spf13/afero/cacheOnReadFs.go')
-rw-r--r--vendor/github.com/spf13/afero/cacheOnReadFs.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/vendor/github.com/spf13/afero/cacheOnReadFs.go b/vendor/github.com/spf13/afero/cacheOnReadFs.go
index e54a4f8..b026e0d 100644
--- a/vendor/github.com/spf13/afero/cacheOnReadFs.go
+++ b/vendor/github.com/spf13/afero/cacheOnReadFs.go
@@ -64,15 +64,10 @@ func (u *CacheOnReadFs) cacheStatus(name string) (state cacheState, fi os.FileIn
return cacheHit, lfi, nil
}
- if err == syscall.ENOENT {
+ if err == syscall.ENOENT || os.IsNotExist(err) {
return cacheMiss, nil, nil
}
- var ok bool
- if err, ok = err.(*os.PathError); ok {
- if err == os.ErrNotExist {
- return cacheMiss, nil, nil
- }
- }
+
return cacheMiss, nil, err
}