From f9837c3ac0c7f611363250684d85be5403a9aa10 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 28 Aug 2017 04:42:16 -0700 Subject: Use path.Join to form log filename (#7293) Omitting the trailing backslash in the directory could cause Mattermost to crash due to permission issues. --- utils/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/config.go b/utils/config.go index 54d768f64..399e3a54c 100644 --- a/utils/config.go +++ b/utils/config.go @@ -10,6 +10,7 @@ import ( "io" "io/ioutil" "os" + "path" "path/filepath" "strconv" "strings" @@ -170,7 +171,7 @@ func GetLogFileLocation(fileLocation string) string { logDir, _ := FindDir("logs") return logDir + LOG_FILENAME } else { - return fileLocation + LOG_FILENAME + return path.Join(fileLocation, LOG_FILENAME) } } -- cgit v1.2.3-1-g7c22