Skip to content

Commit 735d3fe

Browse files
authored
Convert DB input to String to try and avoid any weirdness (#266)
As reported in #265, perhaps the sqlite library doesn't like SubStrings sometimes. It's a pretty easy fix to just convert to String before passing to sqlite_open.
1 parent b20aafa commit 735d3fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SQLite.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ mutable struct DB <: DBInterface.Connection
7878

7979
function DB(f::AbstractString)
8080
handle = Ref{DBHandle}()
81-
f = isempty(f) ? f : expanduser(f)
81+
f = String(isempty(f) ? f : expanduser(f))
8282
if @OK sqlite3_open(f, handle)
8383
db = new(f, handle[], Dict{StmtHandle, _Stmt}(), 0)
8484
finalizer(_close, db)

0 commit comments

Comments
 (0)