mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
patch: linux fuse unmount
todo: grosely exit Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use super::{input_service::*, *};
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
use crate::clipboard_file::*;
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use crate::common::update_clipboard;
|
||||
@@ -175,7 +175,7 @@ pub struct Connection {
|
||||
// by peer
|
||||
disable_audio: bool,
|
||||
// by peer
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
enable_file_transfer: bool,
|
||||
// by peer
|
||||
audio_sender: Option<MediaSender>,
|
||||
@@ -310,7 +310,7 @@ impl Connection {
|
||||
show_remote_cursor: false,
|
||||
ip: "".to_owned(),
|
||||
disable_audio: false,
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
enable_file_transfer: false,
|
||||
disable_clipboard: false,
|
||||
disable_keyboard: false,
|
||||
@@ -457,7 +457,7 @@ impl Connection {
|
||||
ipc::Data::RawMessage(bytes) => {
|
||||
allow_err!(conn.stream.send_raw(bytes).await);
|
||||
}
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(target_os="windows", target_os="linux"))]
|
||||
ipc::Data::ClipboardFile(clip) => {
|
||||
allow_err!(conn.stream.send(&clip_2_msg(clip)).await);
|
||||
}
|
||||
@@ -1156,7 +1156,7 @@ impl Connection {
|
||||
self.audio && !self.disable_audio
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
fn file_transfer_enabled(&self) -> bool {
|
||||
self.file && self.enable_file_transfer
|
||||
}
|
||||
@@ -1706,7 +1706,7 @@ impl Connection {
|
||||
}
|
||||
Some(message::Union::Cliprdr(_clip)) =>
|
||||
{
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
if let Some(clip) = msg_2_clip(_clip) {
|
||||
self.send_to_cm(ipc::Data::ClipboardFile(clip))
|
||||
}
|
||||
@@ -2156,7 +2156,7 @@ impl Connection {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[cfg(windows)]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
if let Ok(q) = o.enable_file_transfer.enum_value() {
|
||||
if q != BoolOption::NotSet {
|
||||
self.enable_file_transfer = q == BoolOption::Yes;
|
||||
|
||||
Reference in New Issue
Block a user