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>
Этот коммит содержится в:
Alejandro García Montoro
2020-08-04 13:58:48 +02:00
коммит произвёл GitHub
родитель 8b7e00f0f7
Коммит 70e649b36a
4 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@@ -206,6 +206,11 @@ func bulkExportCmdF(command *cobra.Command, args []string) error {
// Path to directory of custom emoji
pathToEmojiDir := "data/emoji/"
customDataDir := a.Config().FileSettings.Directory
if customDataDir != nil && *customDataDir != "" {
pathToEmojiDir = *customDataDir + "emoji/"
}
// Name of the directory to export custom emoji
dirNameToExportEmoji := "exported_emoji"