1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

LCOW remotefs - return error in Read() implementation

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2018-01-18 08:01:22 -08:00
parent ef3988a81f
commit 6112ad6e7d

View file

@ -86,7 +86,7 @@ func (l *lcowfile) Read(b []byte) (int, error) {
buf, err := l.getResponse()
if err != nil {
return 0, nil
return 0, err
}
n := copy(b, buf)
@ -105,7 +105,7 @@ func (l *lcowfile) Write(b []byte) (int, error) {
_, err := l.getResponse()
if err != nil {
return 0, nil
return 0, err
}
return len(b), nil
@ -168,7 +168,7 @@ func (l *lcowfile) Readdir(n int) ([]os.FileInfo, error) {
var info []remotefs.FileInfo
if err := json.Unmarshal(buf.Bytes(), &info); err != nil {
return nil, nil
return nil, err
}
osInfo := make([]os.FileInfo, len(info))