Skip to content

Commit

Permalink
wkfs/gcs: on Open, return os.ErrNotExist when storage.ErrObjectNotExi…
Browse files Browse the repository at this point in the history
…st occurs
  • Loading branch information
mpl committed Jun 19, 2018
1 parent 9599cf2 commit 3d43f3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wkfs/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ func (fs *gcsFS) Open(name string) (wkfs.File, error) {
obj := fs.sc.Bucket(bucket).Object(fileName)
attrs, err := obj.Attrs(fs.ctx)
if err != nil {
if err == storage.ErrObjectNotExist {
return nil, os.ErrNotExist
}
return nil, err
}
size := attrs.Size
Expand Down

0 comments on commit 3d43f3e

Please sign in to comment.