Don't modify dsn when has prefix file:

This commit is contained in:
mattn 2015-03-06 02:00:09 +09:00
parent d86face730
commit 519a1d07c4
1 changed files with 3 additions and 1 deletions

View File

@ -286,8 +286,10 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
}
}
if !strings.HasPrefox(dsn, "file:") {
dsn = dsn[:pos]
}
}
var db *C.sqlite3
name := C.CString(dsn)