[PR #1044] [CLOSED] Fix SQLite database opening on UNC/network share paths #2873

Closed
opened 2026-03-01 17:23:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/1Remote/1Remote/pull/1044
Author: @Copilot
Created: 11/28/2025
Status: Closed

Base: mainHead: copilot/fix-smb-database-error


📝 Commits (3)

  • 12bc2a3 Initial plan
  • 14e61cf Fix SQLite database opening issue with UNC/network share paths (Issue #1040)
  • d4535ec Add URI=true parameter to enable URI mode for UNC paths in SQLite

📊 Changes

1 file changed (+12 additions, -1 deletions)

View changed files

📝 Ui/Service/DataSource/DAO/IDataBase.cs (+12 -1)

📄 Description

  • Understand issue #1040: SQLite database cannot be opened when using UNC paths like \\samba\share\folder\1Remote.db
  • Locate the SQLite connection string builder: DbExtensions.GetSqliteConnectionString() in /Ui/Service/DataSource/DAO/IDataBase.cs
  • Modify GetSqliteConnectionString() to properly handle UNC paths by converting them to file URI format
  • Fix: Added URI=true parameter to enable URI mode in System.Data.SQLite (addresses @VShawn feedback)
  • Build the project to verify the change compiles
  • Run code review
  • Run CodeQL security scan - No security issues found
Original prompt

issue #1040 显示,当用户将软件的数据库放到 SMB 共享路径后,数据库会提示 unable to open database file,你要解决这个问题。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/1Remote/1Remote/pull/1044 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 11/28/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `copilot/fix-smb-database-error` --- ### 📝 Commits (3) - [`12bc2a3`](https://github.com/1Remote/1Remote/commit/12bc2a394e887843afddbec55fa9f3f720d17c12) Initial plan - [`14e61cf`](https://github.com/1Remote/1Remote/commit/14e61cf9ef4b5ed42b47a55580e29e3e1f6246bd) Fix SQLite database opening issue with UNC/network share paths (Issue #1040) - [`d4535ec`](https://github.com/1Remote/1Remote/commit/d4535ecb5f9d912d45b44aba2b865ee90fb72798) Add URI=true parameter to enable URI mode for UNC paths in SQLite ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Ui/Service/DataSource/DAO/IDataBase.cs` (+12 -1) </details> ### 📄 Description - [x] Understand issue #1040: SQLite database cannot be opened when using UNC paths like `\\samba\share\folder\1Remote.db` - [x] Locate the SQLite connection string builder: `DbExtensions.GetSqliteConnectionString()` in `/Ui/Service/DataSource/DAO/IDataBase.cs` - [x] Modify `GetSqliteConnectionString()` to properly handle UNC paths by converting them to file URI format - [x] Fix: Added `URI=true` parameter to enable URI mode in System.Data.SQLite (addresses @VShawn feedback) - [x] Build the project to verify the change compiles - [x] Run code review - [x] Run CodeQL security scan - No security issues found <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > issue #1040 显示,当用户将软件的数据库放到 SMB 共享路径后,数据库会提示 `unable to open database file`,你要解决这个问题。 </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 17:23:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#2873
No description provided.