Skip to content

Commit 1e512b8

Browse files
authored
Use filepath instead of path to create SQLite3 database file (#28374)
1 parent c1b86ec commit 1e512b8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/setting/database.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"net"
1010
"net/url"
1111
"os"
12-
"path"
1312
"path/filepath"
1413
"strings"
1514
"time"
@@ -117,7 +116,7 @@ func DBConnStr() (string, error) {
117116
if !EnableSQLite3 {
118117
return "", errors.New("this Gitea binary was not built with SQLite3 support")
119118
}
120-
if err := os.MkdirAll(path.Dir(Database.Path), os.ModePerm); err != nil {
119+
if err := os.MkdirAll(filepath.Dir(Database.Path), os.ModePerm); err != nil {
121120
return "", fmt.Errorf("Failed to create directories: %w", err)
122121
}
123122
journalMode := ""

0 commit comments

Comments
 (0)