mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user