1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

Use io.SeekStart/End/Current constants now for go1.7+ #2154

This commit is contained in:
Nick Craig-Wood
2018-04-06 19:53:06 +01:00
parent 80588a5a6b
commit e5be471ce0
24 changed files with 64 additions and 63 deletions

View File

@@ -732,7 +732,7 @@ func (o *Object) Open(options ...fs.OpenOption) (in io.ReadCloser, err error) {
wrappedFd := readers.NewLimitedReadCloser(fd, limit)
if offset != 0 {
// seek the object
_, err = fd.Seek(offset, 0)
_, err = fd.Seek(offset, io.SeekStart)
// don't attempt to make checksums
return wrappedFd, err
}