mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
patch: don't show enable file clipboard when anyone unsupporting
Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
@@ -1019,13 +1019,6 @@ impl Connection {
|
||||
let mut pi = PeerInfo {
|
||||
username: username.clone(),
|
||||
version: VERSION.to_owned(),
|
||||
has_file_clipboard: cfg!(any(
|
||||
target_os = "windows",
|
||||
all(
|
||||
feature = "unix-file-copy-paste",
|
||||
any(target_os = "linux", target_os = "macos")
|
||||
)
|
||||
)),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -1069,7 +1062,18 @@ impl Connection {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||
#[cfg(any(
|
||||
target_os = "windows",
|
||||
all(
|
||||
any(target_os = "linux", target_os = "macos"),
|
||||
feature = "unix-file-copy-paste"
|
||||
)
|
||||
))]
|
||||
{
|
||||
platform_additions.insert("has_file_clipboard".into(), json!(true));
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))]
|
||||
if !platform_additions.is_empty() {
|
||||
pi.platform_additions = serde_json::to_string(&platform_additions).unwrap_or("".into());
|
||||
}
|
||||
|
||||
@@ -153,13 +153,6 @@ pub fn new() -> GenericService {
|
||||
|
||||
fn displays_to_msg(displays: Vec<DisplayInfo>) -> Message {
|
||||
let mut pi = PeerInfo {
|
||||
has_file_clipboard: cfg!(any(
|
||||
target_os = "windows",
|
||||
all(
|
||||
feature = "unix-file-copy-paste",
|
||||
any(target_os = "linux", target_os = "macos")
|
||||
)
|
||||
)),
|
||||
..Default::default()
|
||||
};
|
||||
pi.displays = displays.clone();
|
||||
|
||||
Reference in New Issue
Block a user