parent
24f9f05264
commit
84b785b78c
|
@ -541,9 +541,15 @@ func (cmd *Command) download(req *snapshotter.Request, path string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read snapshot from the connection
|
// Read snapshot from the connection
|
||||||
if n, err := io.Copy(f, conn); err != nil || n == 0 {
|
n, err := io.Copy(f, conn)
|
||||||
|
if err != nil {
|
||||||
return fmt.Errorf("copy backup to file: err=%v, n=%d", err, n)
|
return fmt.Errorf("copy backup to file: err=%v, n=%d", err, n)
|
||||||
}
|
}
|
||||||
|
if n == 0 {
|
||||||
|
// Unfortunately there is no out-of-band channel to actually return errors from the snapshot service, just
|
||||||
|
// 'data' or 'no data'.
|
||||||
|
return fmt.Errorf("copy backup to file: no data returned, check server logs for snapshot errors")
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}(); err == nil {
|
}(); err == nil {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue