cmd/htpacker: report filename on I/O error
This commit is contained in:
parent
f70914aa38
commit
52213cf67e
|
@ -128,7 +128,7 @@ func filesFromListR(prefix, arg string, ftp packer.FilesToPack) error {
|
||||||
buf := make([]byte, 512)
|
buf := make([]byte, 512)
|
||||||
n, err := f.Read(buf)
|
n, err := f.Read(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return fmt.Errorf("failed to read %s: %v", arg, err)
|
||||||
}
|
}
|
||||||
buf = buf[:n]
|
buf = buf[:n]
|
||||||
ctype := http.DetectContentType(buf)
|
ctype := http.DetectContentType(buf)
|
||||||
|
|
Loading…
Reference in New Issue