Skip to content

Commit

Permalink
Merge pull request google#2094 from orisano/fix-unwrap-error
Browse files Browse the repository at this point in the history
fix: unwrap error for os.IsNotExist
  • Loading branch information
dashpole authored Nov 7, 2018
2 parents 84e5225 + 3d284e1 commit 13e3e83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion container/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (

"github.com/golang/glog"
"github.com/karrick/godirwalk"
"github.com/pkg/errors"
)

func DebugInfo(watches map[string][]string) map[string][]string {
Expand Down Expand Up @@ -165,7 +166,7 @@ func listDirectories(dirpath string, parent string, recursive bool, output map[s
dirents, err := godirwalk.ReadDirents(dirpath, buf)
if err != nil {
// Ignore if this hierarchy does not exist.
if os.IsNotExist(err) {
if os.IsNotExist(errors.Cause(err)) {
err = nil
}
return err
Expand Down

0 comments on commit 13e3e83

Please sign in to comment.