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

@@ -42,7 +42,7 @@ import (
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"strings"
"time"
@@ -626,7 +626,7 @@ func (b *BeegoHTTPRequest) ToFile(filename string) error {
// Check if the file directory exists. If it doesn't then it's created
func pathExistAndMkdir(filename string) (err error) {
filename = path.Dir(filename)
filename = filepath.Dir(filename)
_, err = os.Stat(filename)
if err == nil {
return nil