diff --git a/src/sqlite3/connection.cr b/src/sqlite3/connection.cr index 756ec49..5079c3c 100644 --- a/src/sqlite3/connection.cr +++ b/src/sqlite3/connection.cr @@ -9,7 +9,11 @@ class SQLite3::Connection < DB::Connection end def self.filename(uri : URI) - URI.unescape((uri.host || "") + uri.path) + {% if compare_versions(Crystal::VERSION, "0.30.0-0") >= 0 %} + URI.decode_www_form((uri.host || "") + uri.path) + {% else %} + URI.unescape((uri.host || "") + uri.path) + {% end %} end def build_prepared_statement(query) : Statement