--- a/src/peer.rs +++ b/src/peer.rs @@ -68,17 +68,13 @@ pub(crate) struct PeerMap { impl PeerMap { pub(crate) async fn new() -> ResultType { 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);