use filepath.Join() to build file paths (#5617)

* use filepath.Join() to build file paths

* use filepath.Join() to build file paths
This commit is contained in:
Seiya
2024-03-31 22:26:35 +09:00
committed by GitHub
parent 97066459ed
commit 0609076950
3 changed files with 12 additions and 14 deletions

View File

@@ -21,7 +21,6 @@ import (
"fmt"
"io"
"os"
"path"
"path/filepath"
"strconv"
"strings"
@@ -226,7 +225,7 @@ func (w *fileLogWriter) createLogFile() (*os.File, error) {
return nil, err
}
filepath := path.Dir(w.Filename)
filepath := filepath.Dir(w.Filename)
os.MkdirAll(filepath, os.FileMode(dirperm))
fd, err := os.OpenFile(w.Filename, os.O_WRONLY|os.O_APPEND|os.O_CREATE, os.FileMode(perm))