mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-2061 Include FULL PATH in logs when referring to a directory (#3170)
This commit is contained in:
committed by
Christopher Speller
parent
c5deb333db
commit
397e0a3f68
@@ -623,7 +623,8 @@ func MoveFile(oldPath, newPath string) *model.AppError {
|
||||
|
||||
func WriteFileLocally(f []byte, path string) *model.AppError {
|
||||
if err := os.MkdirAll(filepath.Dir(path), 0774); err != nil {
|
||||
return model.NewLocAppError("WriteFile", "api.file.write_file_locally.create_dir.app_error", nil, err.Error())
|
||||
directory, _ := filepath.Abs(filepath.Dir(path))
|
||||
return model.NewLocAppError("WriteFile", "api.file.write_file_locally.create_dir.app_error", nil, "directory="+directory+", err="+err.Error())
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(path, f, 0644); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user