mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-20 03:31:00 +03:00
Create empty dir on send files in local (#9993)
* feat: Add empty dirs on sendfiles * Update connection.rs --------- Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
client::file_trait::FileManager,
|
||||
common::make_fd_to_json,
|
||||
common::{make_fd_to_json, make_vec_fd_to_json},
|
||||
flutter::{
|
||||
self, session_add, session_add_existed, session_start_, sessions, try_sync_peer_option,
|
||||
},
|
||||
@@ -682,6 +682,27 @@ pub fn session_read_local_dir_sync(
|
||||
"".to_string()
|
||||
}
|
||||
|
||||
pub fn session_read_local_empty_dirs_recursive_sync(
|
||||
_session_id: SessionID,
|
||||
path: String,
|
||||
include_hidden: bool,
|
||||
) -> String {
|
||||
if let Ok(fds) = fs::get_empty_dirs_recursive(&path, include_hidden) {
|
||||
return make_vec_fd_to_json(&fds);
|
||||
}
|
||||
"".to_string()
|
||||
}
|
||||
|
||||
pub fn session_read_remote_empty_dirs_recursive_sync(
|
||||
session_id: SessionID,
|
||||
path: String,
|
||||
include_hidden: bool,
|
||||
) {
|
||||
if let Some(session) = sessions::get_session_by_session_id(&session_id) {
|
||||
session.read_empty_dirs(path, include_hidden);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn session_get_platform(session_id: SessionID, is_remote: bool) -> String {
|
||||
if let Some(session) = sessions::get_session_by_session_id(&session_id) {
|
||||
return session.get_platform(is_remote);
|
||||
|
||||
Reference in New Issue
Block a user