Merge pull request #787 from ahmetalpbalkan/next-generation

NG: Fix read offset check for inmemory driver
This commit is contained in:
Stephen Day 2014-11-26 10:18:53 -08:00
commit 1f772456b0

View file

@ -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}
}