Handle error during copy of original content
Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
This commit is contained in:
parent
9f7f23e373
commit
16a49ade16
1 changed files with 3 additions and 1 deletions
|
@ -343,7 +343,9 @@ func (d *driver) WriteStream(ctx context.Context, path string, offset int64, rea
|
|||
if err != nil {
|
||||
return bytesRead, parseError(path, err)
|
||||
}
|
||||
io.Copy(currentSegment, file)
|
||||
if _, err := io.Copy(currentSegment, file); err != nil {
|
||||
return bytesRead, parseError(path, err)
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
if n > 0 {
|
||||
|
|
Loading…
Reference in a new issue