Use path.Join to form log filename (#7293)

Omitting the trailing backslash in the directory could cause
Mattermost to crash due to permission issues.
This commit is contained in:
Stan Hu
2017-08-28 07:42:16 -04:00
committed by Joram Wilander
parent c81d0f120a
commit f9837c3ac0
+2 -1
View File
@@ -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)
}
}