forked from mirror/go-sqlcipher
Don't modify dsn when has prefix file:
This commit is contained in:
parent
d86face730
commit
519a1d07c4
|
@ -286,8 +286,10 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !strings.HasPrefox(dsn, "file:") {
|
||||||
dsn = dsn[:pos]
|
dsn = dsn[:pos]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var db *C.sqlite3
|
var db *C.sqlite3
|
||||||
name := C.CString(dsn)
|
name := C.CString(dsn)
|
||||||
|
|
Loading…
Reference in New Issue