good morning!!!!

Skip to content
Snippets Groups Projects
Commit 6e3dcba2 authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Closing #60.

parent 1115f25b
Branches
Tags
No related merge requests found
...@@ -43,9 +43,13 @@ func (c ConnectionURL) String() (s string) { ...@@ -43,9 +43,13 @@ func (c ConnectionURL) String() (s string) {
return "" return ""
} }
// Does the database have an existing name? // Did the user provided a full database path?
if strings.HasPrefix(c.Database, "/") == false { if strings.HasPrefix(c.Database, "/") == false {
c.Database, _ = filepath.Abs(c.Database) c.Database, _ = filepath.Abs(c.Database)
if runtime.GOOS == "windows" {
// Closes https://github.com/upper/db/issues/60
c.Database = "/" + strings.Replace(c.Database, `\`, `/`, -1)
}
} }
// Do we have any options? // Do we have any options?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment