Handle error during copy of original content
Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
This commit is contained in:
parent
5f6a07756f
commit
5e650a820a
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