We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0e3c43 commit 2afb0ccCopy full SHA for 2afb0cc
modules/setting/database.go
@@ -119,9 +119,9 @@ func DBConnStr() (string, error) {
119
if !EnableSQLite3 {
120
return "", errors.New("this Gitea binary was not built with SQLite3 support")
121
}
122
- if Database.Path != ":memory:" && Database.Path != "" && Database.Path[0] != '/' {
+ if Database.Path != ":memory:" {
123
if err := os.MkdirAll(filepath.Dir(Database.Path), os.ModePerm); err != nil {
124
- return "", fmt.Errorf("Failed to create directories: %w", err)
+ return "", fmt.Errorf("failed to create directories: %w", err)
125
126
127
journalMode := ""
0 commit comments