Fix empty string comparison issues in the codebase (#16686)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
200a56fa5a
Коммит
94c24eea20
@@ -498,7 +498,7 @@ func (a *App) UploadMultipartFiles(teamId string, channelId string, userId strin
|
||||
// the same length. clientIds should either not be provided or have the same length as files and filenames.
|
||||
// The provided files should be closed by the caller so that they are not leaked.
|
||||
func (a *App) UploadFiles(teamId string, channelId string, userId string, files []io.ReadCloser, filenames []string, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError) {
|
||||
if len(*a.Config().FileSettings.DriverName) == 0 {
|
||||
if *a.Config().FileSettings.DriverName == "" {
|
||||
return nil, model.NewAppError("UploadFiles", "api.file.upload_file.storage.app_error", nil, "", http.StatusNotImplemented)
|
||||
}
|
||||
|
||||
@@ -703,7 +703,7 @@ func (a *App) UploadFileX(channelId, name string, input io.Reader,
|
||||
o(t)
|
||||
}
|
||||
|
||||
if len(*a.Config().FileSettings.DriverName) == 0 {
|
||||
if *a.Config().FileSettings.DriverName == "" {
|
||||
return nil, t.newAppError("api.file.upload_file.storage.app_error",
|
||||
"", http.StatusNotImplemented)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user