pull/31227/merge
Evan Anderson 2 days ago committed by GitHub
commit ddc36f08d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -26,7 +26,6 @@ import (
"log/slog"
"net/url"
"os"
"path"
"path/filepath"
"strings"
"sync"
@ -697,7 +696,7 @@ func createOrOpenFile(filename string, appendData bool) (*os.File, error) {
// check if the directory exists to create file. creates if doesn't exist
func ensureDirectoryForFile(file string) error {
baseDir := path.Dir(file)
baseDir := filepath.Dir(file)
_, err := os.Stat(baseDir)
if err != nil && !errors.Is(err, fs.ErrNotExist) {
return err

@ -23,7 +23,6 @@ import (
"io"
"io/fs"
"os"
"path"
"path/filepath"
"regexp"
"slices"
@ -250,7 +249,7 @@ func createOrOpenFile(filename string, appendData bool) (*os.File, error) {
}
func ensureDirectoryForFile(file string) error {
baseDir := path.Dir(file)
baseDir := filepath.Dir(file)
_, err := os.Stat(baseDir)
if err != nil && !errors.Is(err, fs.ErrNotExist) {
return err

Loading…
Cancel
Save