Merge pull request #4873 from 21pages/fix

fix config load
This commit is contained in:
RustDesk 2023-07-05 11:02:32 +08:00 committed by GitHub
commit 5cef21fd40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 4 deletions

2
Cargo.lock generated
View File

@ -1054,7 +1054,7 @@ dependencies = [
[[package]] [[package]]
name = "confy" name = "confy"
version = "0.4.0-2" version = "0.4.0-2"
source = "git+https://github.com/open-trade/confy#9f231b2039cf8a8f8cdf6b829c5ac0016e146077" source = "git+https://github.com/open-trade/confy#7855cd3c32b1a60b44e5076ee8f6b4131da10350"
dependencies = [ dependencies = [
"directories-next", "directories-next",
"serde 1.0.163", "serde 1.0.163",

View File

@ -1031,8 +1031,12 @@ impl PeerConfig {
}; };
let c = PeerConfig::load(&id_decoded_string); let c = PeerConfig::load(&id_decoded_string);
if c.info.platform.is_empty() {
fs::remove_file(p).ok();
}
(id_decoded_string, t, c) (id_decoded_string, t, c)
}) })
.filter(|p| !p.2.info.platform.is_empty())
.collect(); .collect();
peers.sort_unstable_by(|a, b| b.1.cmp(&a.1)); peers.sort_unstable_by(|a, b| b.1.cmp(&a.1));
return peers; return peers;

View File

@ -453,7 +453,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Voice call", "语音通话"), ("Voice call", "语音通话"),
("Text chat", "文字聊天"), ("Text chat", "文字聊天"),
("Stop voice call", "停止语音通话"), ("Stop voice call", "停止语音通话"),
("relay_hint_tip", "可能无法直连,可以尝试中继连接。\n另外,如果想直接使用中继连接,可以在 ID 后面添加/r或者在卡片选项里选择强制走中继连接。"), ("relay_hint_tip", "可能无法直连,可以尝试中继连接。\n另外,如果想直接使用中继连接,可以在 ID 后面添加/r如果最近访问里存在该卡片,也可以在卡片选项里选择强制走中继连接。"),
("Reconnect", "重连"), ("Reconnect", "重连"),
("Codec", "编解码"), ("Codec", "编解码"),
("Resolution", "分辨率"), ("Resolution", "分辨率"),

View File

@ -44,7 +44,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("wait_accept_uac_tip", "Please wait for the remote user to accept the UAC dialog."), ("wait_accept_uac_tip", "Please wait for the remote user to accept the UAC dialog."),
("still_click_uac_tip", "Still requires the remote user to click OK on the UAC window of running RustDesk."), ("still_click_uac_tip", "Still requires the remote user to click OK on the UAC window of running RustDesk."),
("config_microphone", "In order to speak remotely, you need to grant RustDesk \"Record Audio\" permissions."), ("config_microphone", "In order to speak remotely, you need to grant RustDesk \"Record Audio\" permissions."),
("relay_hint_tip", "It may not be possible to connect directly; you can try connecting via relay. Additionally, if you want to use a relay on your first attempt, you can add the \"/r\" suffix to the ID or select the option \"Always connect via relay\" in the card of recent sessions."), ("relay_hint_tip", "It may not be possible to connect directly; you can try connecting via relay. Additionally, if you want to use a relay on your first attempt, you can add the \"/r\" suffix to the ID or select the option \"Always connect via relay\" in the card of recent sessions if it exists."),
("No transfers in progress", ""), ("No transfers in progress", ""),
("idd_driver_tip", "Install virtual display driver which is used when you have no physical displays."), ("idd_driver_tip", "Install virtual display driver which is used when you have no physical displays."),
("confirm_idd_driver_tip", "The option to install the virtual display driver is checked. Note that a test certificate will be installed to trust the virtual display driver. This test certificate will only be used to trust Rustdesk drivers."), ("confirm_idd_driver_tip", "The option to install the virtual display driver is checked. Note that a test certificate will be installed to trust the virtual display driver. This test certificate will only be used to trust Rustdesk drivers."),

View File

@ -453,7 +453,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Voice call", "語音通話"), ("Voice call", "語音通話"),
("Text chat", "文字聊天"), ("Text chat", "文字聊天"),
("Stop voice call", "停止語音通話"), ("Stop voice call", "停止語音通話"),
("relay_hint_tip", "可能無法直接連線,可以嘗試中繼連線。\n另外,如果想要直接使用中繼連線,可以在 ID 後面新增/r或者在卡片選項裡選擇強制走中繼連線"), ("relay_hint_tip", "可能無法直接連線,可以嘗試中繼連線。\n另外,如果想要直接使用中繼連線,可以在 ID 後面新增/r如果最近訪問裏存在該卡片,也可以在卡片選項裏選擇強制走中繼連接"),
("Reconnect", "重新連線"), ("Reconnect", "重新連線"),
("Codec", "編解碼器"), ("Codec", "編解碼器"),
("Resolution", "解析度"), ("Resolution", "解析度"),