diff options
author | mattn <mattn.jp@gmail.com> | 2015-03-06 02:00:09 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2015-03-06 02:00:09 +0900 |
commit | 519a1d07c47c910b0e9bc0473497e2efbd90b13c (patch) | |
tree | d7f988c966be280aec876689c09c7d27bad1e0c1 | |
parent | Fix filename with loc parameter (diff) | |
download | golite-519a1d07c47c910b0e9bc0473497e2efbd90b13c.tar.gz golite-519a1d07c47c910b0e9bc0473497e2efbd90b13c.tar.xz |
Don't modify dsn when has prefix file:
-rw-r--r-- | sqlite3.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |