feat: file transfer, resume (#12626)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-08-25 14:34:03 +08:00
committed by GitHub
parent 9e22f9639a
commit f4fb31d7a1
19 changed files with 88 additions and 37 deletions

View File

@@ -2705,7 +2705,11 @@ impl Connection {
}
Some(file_action::Union::SendConfirm(r)) => {
if let Some(job) = fs::get_job(r.id, &mut self.read_jobs) {
job.confirm(&r);
job.confirm(&r).await;
} else {
if let Ok(sc) = r.write_to_bytes() {
self.send_fs(ipc::FS::SendConfirm(sc));
}
}
}
Some(file_action::Union::Rename(r)) => {
@@ -2749,6 +2753,7 @@ impl Connection {
file_size: d.file_size,
last_modified: d.last_modified,
is_upload: true,
is_resume: d.is_resume,
}),
Some(file_response::Union::Error(e)) => {
self.send_fs(ipc::FS::WriteError {