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:
parent
ef3988a81f
commit
6112ad6e7d
1 changed files with 3 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue