Merge pull request #787 from ahmetalpbalkan/next-generation
NG: Fix read offset check for inmemory driver
This commit is contained in:
commit
1f772456b0
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ func (d *Driver) ReadStream(path string, offset uint64) (io.ReadCloser, error) {
|
|||
contents, err := d.GetContent(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if len(contents) < int(offset) {
|
||||
} else if len(contents) <= int(offset) {
|
||||
return nil, storagedriver.InvalidOffsetError{Path: path, Offset: offset}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue