Fix for go<1.16
This commit is contained in:
parent
15ccbc95c6
commit
48843c0b87
|
@ -4,6 +4,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
"path"
|
"path"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -121,7 +122,7 @@ func (s piecePerResourcePiece) MarkComplete() error {
|
||||||
if ccr, ok := s.rp.(ConsecutiveChunkReader); ok {
|
if ccr, ok := s.rp.(ConsecutiveChunkReader); ok {
|
||||||
return ccr.ReadConsecutiveChunks(s.incompleteDirPath() + "/")
|
return ccr.ReadConsecutiveChunks(s.incompleteDirPath() + "/")
|
||||||
}
|
}
|
||||||
return io.NopCloser(io.NewSectionReader(incompleteChunks, 0, s.mp.Length())), nil
|
return ioutil.NopCloser(io.NewSectionReader(incompleteChunks, 0, s.mp.Length())), nil
|
||||||
}()
|
}()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("getting incomplete chunks reader: %w", err)
|
return fmt.Errorf("getting incomplete chunks reader: %w", err)
|
||||||
|
|
Loading…
Reference in New Issue