Do not close file if it could not be opened
This commit is contained in:
parent
ef498a987b
commit
b4cb75693e
1 changed files with 1 additions and 1 deletions
|
@ -134,10 +134,10 @@ type zReader interface {
|
|||
func (s Server) LoadJSONID(t backend.Type, storageID backend.ID, item interface{}) error {
|
||||
// read
|
||||
rd, err := s.GetReader(t, storageID)
|
||||
defer rd.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer rd.Close()
|
||||
|
||||
// decrypt
|
||||
decryptRd, err := s.key.DecryptFrom(rd)
|
||||
|
|
Loading…
Reference in a new issue