Skip to content

Commit

Permalink
info may be nil
Browse files Browse the repository at this point in the history
info may be nil caused by network error or other errors
  • Loading branch information
elebore committed Jul 13, 2018
1 parent e2c734b commit 0d67376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (c *Client) walk(path string, walkFn filepath.WalkFunc) error {

err = walkFn(path, info, err)
if err != nil {
if info.IsDir() && err == filepath.SkipDir {
if info != nil && info.IsDir() && err == filepath.SkipDir {
return nil
}

Expand Down

0 comments on commit 0d67376

Please sign in to comment.