Skip to content

Conversation

@BrycensRanch
Copy link
Contributor

Previously, opening a SQLite database stored on a network share via a UNC path

e.g. \\server\share\file.db) would fail with unable to open database file

This 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's Microsoft.Data.Sqlite, which has never had this exact bug, while the bug has stayed open for over a decade in System.Data.Sqlite

If 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

…gs via .NET

Previously, opening a SQLite database stored on a network share via a UNC path
 (e.g. \\server\share\file.db) would fail with "unable to open database file".

 This change uses .NET’s connection string parsing to correctly handle UNC paths,
 ensuring databases on network shares can be opened without errors.

 Fixes ShareX#8047
I was testing escaping UNC paths. It did work, but parsing via .NET simply *just works* without using Regex.
@Jaex
Copy link
Member

Jaex commented Aug 15, 2025

Thanks!

@Jaex Jaex merged commit b7b3b73 into ShareX:develop Aug 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unable to open database file 18.0 pre-release

2 participants