From 5c1049054eace710abd3418bbad141fbb7dd5d7f Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 23 May 2017 11:06:25 -0400 Subject: PLT-6471 Properly panic when translations can't be loaded (#6414) * PLT-6471 Properly panic when translations can't be loaded * Print usage messages when errors occur during CLI initialization * Reverted behaviour of FindDir and added second return value to it * Fixed merge conflict --- app/user.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/user.go') diff --git a/app/user.go b/app/user.go index 44e1ce3f6..2a570c7ac 100644 --- a/app/user.go +++ b/app/user.go @@ -709,7 +709,8 @@ func CreateProfileImage(username string, userId string) ([]byte, *model.AppError initial := string(strings.ToUpper(username)[0]) - fontBytes, err := ioutil.ReadFile(utils.FindDir("fonts") + utils.Cfg.FileSettings.InitialFont) + fontDir, _ := utils.FindDir("fonts") + fontBytes, err := ioutil.ReadFile(fontDir + utils.Cfg.FileSettings.InitialFont) if err != nil { return nil, model.NewLocAppError("CreateProfileImage", "api.user.create_profile_image.default_font.app_error", nil, err.Error()) } -- cgit v1.2.3-1-g7c22