|
|
@@ -5,7 +5,6 @@ import (
|
|
|
"encoding/json"
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
- "io/fs"
|
|
|
"os"
|
|
|
"os/exec"
|
|
|
"runtime"
|
|
|
@@ -321,7 +320,7 @@ func (p *process) Start() (err error) {
|
|
|
if p.configPath != "" {
|
|
|
configPath = p.configPath
|
|
|
}
|
|
|
- err = os.WriteFile(configPath, data, fs.ModePerm)
|
|
|
+ err = os.WriteFile(configPath, data, 0644)
|
|
|
if err != nil {
|
|
|
return common.NewErrorf("Failed to write configuration file: %v", err)
|
|
|
}
|
|
|
@@ -381,5 +380,5 @@ func (p *process) Stop() error {
|
|
|
// writeCrashReport writes a crash report to the binary folder with a timestamped filename.
|
|
|
func writeCrashReport(m []byte) error {
|
|
|
crashReportPath := config.GetBinFolderPath() + "/core_crash_" + time.Now().Format("20060102_150405") + ".log"
|
|
|
- return os.WriteFile(crashReportPath, m, os.ModePerm)
|
|
|
+ return os.WriteFile(crashReportPath, m, 0644)
|
|
|
}
|