Skip to content

Commit 2afb0cc

Browse files
committed
Remove unnecesary code
1 parent e0e3c43 commit 2afb0cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/setting/database.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ func DBConnStr() (string, error) {
119119
if !EnableSQLite3 {
120120
return "", errors.New("this Gitea binary was not built with SQLite3 support")
121121
}
122-
if Database.Path != ":memory:" && Database.Path != "" && Database.Path[0] != '/' {
122+
if Database.Path != ":memory:" {
123123
if err := os.MkdirAll(filepath.Dir(Database.Path), os.ModePerm); err != nil {
124-
return "", fmt.Errorf("Failed to create directories: %w", err)
124+
return "", fmt.Errorf("failed to create directories: %w", err)
125125
}
126126
}
127127
journalMode := ""

0 commit comments

Comments
 (0)