mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-21 12:11:06 +03:00
Feat: file transfer, resume (#12557)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -880,6 +880,7 @@ async fn handle_fs(
|
||||
let path = get_string(&fs::TransferJob::join(p, &file.name));
|
||||
match is_write_need_confirmation(&path, &digest) {
|
||||
Ok(digest_result) => {
|
||||
job.set_digest(file_size, last_modified);
|
||||
match digest_result {
|
||||
DigestCheckResult::IsSame => {
|
||||
req.set_skip(true);
|
||||
@@ -909,6 +910,13 @@ async fn handle_fs(
|
||||
}
|
||||
}
|
||||
}
|
||||
ipc::FS::SendConfirm(bytes) => {
|
||||
if let Ok(r) = FileTransferSendConfirmRequest::parse_from_bytes(&bytes) {
|
||||
if let Some(job) = fs::get_job(r.id, write_jobs) {
|
||||
job.confirm(&r).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
ipc::FS::Rename { id, path, new_name } => {
|
||||
rename_file(path, new_name, id, tx).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user