mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +00:00
Do not close file if it could not be opened
This commit is contained in:
parent
ef498a987b
commit
b4cb75693e
@ -134,10 +134,10 @@ type zReader interface {
|
|||||||
func (s Server) LoadJSONID(t backend.Type, storageID backend.ID, item interface{}) error {
|
func (s Server) LoadJSONID(t backend.Type, storageID backend.ID, item interface{}) error {
|
||||||
// read
|
// read
|
||||||
rd, err := s.GetReader(t, storageID)
|
rd, err := s.GetReader(t, storageID)
|
||||||
defer rd.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer rd.Close()
|
||||||
|
|
||||||
// decrypt
|
// decrypt
|
||||||
decryptRd, err := s.key.DecryptFrom(rd)
|
decryptRd, err := s.key.DecryptFrom(rd)
|
||||||
|
Loading…
Reference in New Issue
Block a user