mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-17 18:21:02 +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:
@@ -43,6 +43,18 @@ pub trait FileManager: Interface {
|
||||
self.send(Data::CancelJob(id));
|
||||
}
|
||||
|
||||
fn read_empty_dirs(&self, path: String, include_hidden: bool) {
|
||||
let mut msg_out = Message::new();
|
||||
let mut file_action = FileAction::new();
|
||||
file_action.set_read_empty_dirs(ReadEmptyDirs {
|
||||
path,
|
||||
include_hidden,
|
||||
..Default::default()
|
||||
});
|
||||
msg_out.set_file_action(file_action);
|
||||
self.send(Data::Message(msg_out));
|
||||
}
|
||||
|
||||
fn read_remote_dir(&self, path: String, include_hidden: bool) {
|
||||
let mut msg_out = Message::new();
|
||||
let mut file_action = FileAction::new();
|
||||
|
||||
@@ -1299,6 +1299,9 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
}
|
||||
Some(message::Union::FileResponse(fr)) => {
|
||||
match fr.union {
|
||||
Some(file_response::Union::EmptyDirs(res)) => {
|
||||
self.handler.update_empty_dirs(res);
|
||||
}
|
||||
Some(file_response::Union::Dir(fd)) => {
|
||||
#[cfg(windows)]
|
||||
let entries = fd.entries.to_vec();
|
||||
|
||||
Reference in New Issue
Block a user