From 519a1d07c47c910b0e9bc0473497e2efbd90b13c Mon Sep 17 00:00:00 2001 From: mattn Date: Fri, 6 Mar 2015 02:00:09 +0900 Subject: [PATCH] Don't modify dsn when has prefix file: --- sqlite3.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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