Restore UNC path support by parsing connection string with .NET #8052
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, opening a SQLite database stored on a network share via a UNC path
e.g.
\\server\share\file.db) would fail withunable to open database fileThis change uses .NET’s connection string parsing to correctly handle UNC paths,
ensuring databases on network shares can be opened without errors.
The previous failure of parsing lies in
System.Data.Sqlite. SnapX does not have this bug because it uses Microsoft'sMicrosoft.Data.Sqlite, which has never had this exact bug, while the bug has stayed open for over a decade inSystem.Data.SqliteIf ShareX runs into any further issues with
System.Data.Sqlite, I'm happy to send a PR to switch it over.This change has been tested on SMB3 shares and works on both network drive letters and UNC paths. Most importantly, it has been tested against regular paths.
Fixes #8047