patch: update UI, clear previous FUSE

- UI updated, now allow copy and paste file in Linux
- Too hard to implement graceful shutdown for rustdesk, just clear
  previously mounted FUSE should also works

Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
ClSlaid
2023-10-07 17:26:20 +08:00
parent d2a5edda46
commit a597c3f835
11 changed files with 81 additions and 22 deletions

View File

@@ -37,7 +37,11 @@ pub fn create_cliprdr_context(
let mut tmp_path = std::env::temp_dir();
tmp_path.push("rustdesk-cliprdr");
log::info!("check mount point existence");
log::info!("clear previously mounted cliprdr FUSE");
if let Err(e) = std::process::Command::new("umount").arg(&tmp_path).status() {
log::warn!("umount {:?} may fail: {:?}", tmp_path, e);
}
let rd_mnt = if !tmp_path.exists() {
log::info!("create mount point: {}", tmp_path.display());
std::fs::create_dir_all(tmp_path.clone())?;