filestore: Remove useless defer (#318)

Since the `file` is not used after the creation, its closing can be done without defer (and the err can be checked).
This commit is contained in:
oliverpool 2019-10-23 18:51:36 +02:00 committed by Marius
parent d6ac521667
commit e138fc3e9e
1 changed files with 4 additions and 1 deletions

View File

@ -65,7 +65,10 @@ func (store FileStore) NewUpload(ctx context.Context, info handler.FileInfo) (ha
}
return nil, err
}
defer file.Close()
err = file.Close()
if err != nil {
return nil, err
}
upload := &fileUpload{
info: info,