op-packages/rustdesk-server/patches/003-update-db-path.patch
github-actions[bot] 32600acc60 🌴 Sync 2026-03-05 23:51:42
2026-03-05 23:51:42 +08:00

22 lines
781 B
Diff

--- a/src/peer.rs
+++ b/src/peer.rs
@@ -68,17 +68,13 @@ pub(crate) struct PeerMap {
impl PeerMap {
pub(crate) async fn new() -> ResultType<Self> {
let db = std::env::var("DB_URL").unwrap_or({
- let mut db = "db_v2.sqlite3".to_owned();
+ let db = "/var/run/rustdesk-server/db_v2.sqlite3".to_owned();
#[cfg(all(windows, not(debug_assertions)))]
{
if let Some(path) = hbb_common::config::Config::icon_path().parent() {
db = format!("{}\\{}", path.to_str().unwrap_or("."), db);
}
}
- #[cfg(not(windows))]
- {
- db = format!("./{db}");
- }
db
});
log::info!("DB_URL={}", db);