several one-line panic, race, and logic fixes (#7766)
Этот коммит содержится в:
@@ -315,11 +315,11 @@ func addLicense(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
fileData := fileArray[0]
|
||||
|
||||
file, err := fileData.Open()
|
||||
defer file.Close()
|
||||
if err != nil {
|
||||
c.Err = model.NewAppError("addLicense", "api.license.add_license.open.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
buf := bytes.NewBuffer(nil)
|
||||
io.Copy(buf, file)
|
||||
|
||||
Ссылка в новой задаче
Block a user