Remove unnecesary code

This commit is contained in:
Lunny Xiao 2024-11-21 23:41:27 -08:00
parent e0e3c434cb
commit 2afb0cc055

View File

@ -119,9 +119,9 @@ func DBConnStr() (string, error) {
if !EnableSQLite3 {
return "", errors.New("this Gitea binary was not built with SQLite3 support")
}
if Database.Path != ":memory:" && Database.Path != "" && Database.Path[0] != '/' {
if Database.Path != ":memory:" {
if err := os.MkdirAll(filepath.Dir(Database.Path), os.ModePerm); err != nil {
return "", fmt.Errorf("Failed to create directories: %w", err)
return "", fmt.Errorf("failed to create directories: %w", err)
}
}
journalMode := ""