Skip to content

Commit

Permalink
daemon/graphdriver/windows: NewLayerReader() use errors.Is()
Browse files Browse the repository at this point in the history
This error is returned by hcsshim LayerReader.Read(), which is not stdlib, so
may wrap errors.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Oct 10, 2022
1 parent fb1e9f5 commit 30b791c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/graphdriver/windows/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,10 @@ func (d *Driver) Changes(id, _ string) ([]archive.Change, error) {

for {
name, _, fileInfo, err := r.Next()
if err == io.EOF {
return nil
}
if err != nil {
if errors.Is(err, io.EOF) {
return nil
}
return err
}
name = filepath.ToSlash(name)
Expand Down

0 comments on commit 30b791c

Please sign in to comment.