mirror of
https://github.com/octoleo/restic.git
synced 2025-01-22 22:58:26 +00:00
Merge pull request #1185 from prattmic/gcs_panic
gs: fix nil dereference
This commit is contained in:
commit
4118ce876e
@ -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…
x
Reference in New Issue
Block a user