Merge pull request #36051 from Microsoft/jjh/remotefs-read-return-error

LCOW remotefs - return error in Read() implementation
This commit is contained in:
Vincent Demeester 2018-01-19 11:27:13 -08:00 committed by GitHub
commit 3c9d023af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

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))