Skip to content

Commit

Permalink
Convert DB input to String to try and avoid any weirdness (#266)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
quinnj authored Oct 23, 2021
1 parent b20aafa commit 735d3fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SQLite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ mutable struct DB <: DBInterface.Connection

function DB(f::AbstractString)
handle = Ref{DBHandle}()
f = isempty(f) ? f : expanduser(f)
f = String(isempty(f) ? f : expanduser(f))
if @OK sqlite3_open(f, handle)
db = new(f, handle[], Dict{StmtHandle, _Stmt}(), 0)
finalizer(_close, db)
Expand Down

2 comments on commit 735d3fe

@quinnj
Copy link
Member Author

@quinnj quinnj commented on 735d3fe Jan 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: "Tag with name v1.3.0 already exists and points to a different commit"

Please sign in to comment.