MM-27178: Use FileSettings.Directory in export tool (#15100)
* MM-27178: use FileSettings.Directory in export * Set empty FileSettings.Directory to default value * Validate that FileSettings.Directory is non-empty * Don't set FileSettings.Directory to / in fixConfig * Run make i18n-extract Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8b7e00f0f7
Коммит
70e649b36a
@@ -1280,7 +1280,7 @@ func (s *FileSettings) SetDefaults(isUpdate bool) {
|
||||
s.DriverName = NewString(IMAGE_DRIVER_LOCAL)
|
||||
}
|
||||
|
||||
if s.Directory == nil {
|
||||
if s.Directory == nil || *s.Directory == "" {
|
||||
s.Directory = NewString(FILE_SETTINGS_DEFAULT_DIRECTORY)
|
||||
}
|
||||
|
||||
@@ -3018,6 +3018,10 @@ func (s *FileSettings) isValid() *AppError {
|
||||
return NewAppError("Config.IsValid", "model.config.is_valid.file_salt.app_error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if *s.Directory == "" {
|
||||
return NewAppError("Config.IsValid", "model.config.is_valid.directory.app_error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user