System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
Ticket Hash: d1c4880f98e672f820b656dea9d75392dd0b5ff4
Title: Unable to open database on WIndows
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: Connection Resolution: Works_As_Designed
Last Modified: 2020-10-29 02:33:56
Version Found In: 1.0.112
User Comments:
anonymous added on 2020-01-11 11:44:46: (text/x-markdown)
Running tests from a project, I see a lot of failures with "unable to open database" errors. Tracing through decompiled code via rider, the problem seems to be in SQLiteConnection.MapUriPath, where a uri like file:///C:/Path/To/Database.db is being erroneously translated into /C:/Path/Do/Database.db and later on that is expanded to "C:\C:\Path\To\Database.db" by SQLiteConnection.ExpandFileName, which, of course, cannot be opened.

I would have raised a PR with a code fix, but I'm not sure how to do so considering the download source options from system.data.sqlite.org mention using Fossil or provide snapshot code. If this project were on GitHub (or something similar with a pull request workflow), I'd have provided a fix. Sorry.

mistachkin added on 2020-01-11 18:16:28: (text/x-fossil-wiki)
Are you using the "Uri" connection string property?  In that case, using three
slashes is not supported.  Per the documentation:

<verbatim>
If specified, this must be a file name that starts with "file://", "file:",
or "/". Any leading "file://" or "file:" prefix will be stripped off and the
resulting file name will be used to open the database. 
</verbatim>

mistachkin added on 2020-01-11 18:17:13: (text/x-markdown)
In theory, this could be changed, but it would technically introduce a backward
compatibility problem (e.g. somebody using a URI for a UNC path?).