From b4cb75693e62ab427148a37eecb89ba92bec4d1d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 22 Feb 2015 00:21:56 +0100 Subject: [PATCH] Do not close file if it could not be opened --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index 2dd71357f..289ee5505 100644 --- a/server.go +++ b/server.go @@ -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)