b2: Fix seek producing corrupted file errors

This commit is contained in:
Nick Craig-Wood 2016-10-07 12:16:25 +01:00
parent d033e92234
commit 98804cb860
1 changed files with 4 additions and 0 deletions

View File

@ -1121,6 +1121,10 @@ func (o *Object) Open(options ...fs.OpenOption) (in io.ReadCloser, err error) {
fs.Debug(o, "Reading sha1 from info - %q", o.sha1)
}
}
// Don't check length or hash on partial content
if resp.StatusCode == http.StatusPartialContent {
return resp.Body, nil
}
return newOpenFile(o, resp), nil
}