diff --git a/sqlite3.go b/sqlite3.go index 6b74f7f..b7b7f81 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -286,7 +286,9 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) { } } - dsn = dsn[:pos] + if !strings.HasPrefox(dsn, "file:") { + dsn = dsn[:pos] + } } var db *C.sqlite3