Commit e0de488a authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Return error if SpliceCopy fails.

parent e94d1080
package splice package splice
import ( import (
"fmt"
"io" "io"
"os" "os"
) )
...@@ -22,7 +23,7 @@ func SpliceCopy(dst *os.File, src *os.File, p *Pair) (int64, error) { ...@@ -22,7 +23,7 @@ func SpliceCopy(dst *os.File, src *os.File, p *Pair) (int64, error) {
return total, err return total, err
} }
if m < n { if m < n {
panic("m<n") return total, err
} }
if int(n) < p.size { if int(n) < p.size {
break break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment