forked from TrueCloudLab/restic
Merge pull request #1185 from prattmic/gcs_panic
gs: fix nil dereference
This commit is contained in:
commit
4118ce876e
1 changed files with 7 additions and 2 deletions
|
@ -223,9 +223,14 @@ func (be *Backend) Save(ctx context.Context, h restic.Handle, rd io.Reader) (err
|
|||
}).Media(rd).Do()
|
||||
|
||||
be.sem.ReleaseToken()
|
||||
debug.Log("%v -> %v bytes, err %#v: %v", objName, info.Size, err, err)
|
||||
|
||||
return errors.Wrap(err, "service.Objects.Insert")
|
||||
if err != nil {
|
||||
debug.Log("%v: err %#v: %v", objName, err, err)
|
||||
return errors.Wrap(err, "service.Objects.Insert")
|
||||
}
|
||||
|
||||
debug.Log("%v -> %v bytes", objName, info.Size)
|
||||
return nil
|
||||
}
|
||||
|
||||
// wrapReader wraps an io.ReadCloser to run an additional function on Close.
|
||||
|
|
Loading…
Reference in a new issue