-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Feat: file transfer, resume #12557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: file transfer, resume #12557
Conversation
6304737
to
72e039f
Compare
72e039f
to
ae602f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements file transfer resume functionality and fixes a bug in the file transfer path handling. The changes enable resuming interrupted file transfers by checking file digests and setting appropriate overwrite strategies, while also correcting a path issue in the receive operation.
- Adds resume capability for file transfers by checking digest identity and transferred size
- Fixes
new_receive()
to send the correct remote path instead of local path - Updates confirmation handling to be asynchronous across the codebase
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
src/ui_cm_interface.rs | Adds digest setting and SendConfirm handling for file transfer operations |
src/server/connection.rs | Updates confirmation handling to async and adds fallback IPC forwarding |
src/ipc.rs | Adds SendConfirm variant to FS enum and imports required types |
src/client/io_loop.rs | Implements resume logic with digest checking and fixes path bug in new_receive |
ae602f1
to
c803776
Compare
Signed-off-by: fufesou <linlong1266@gmail.com>
c803776
to
84e9c2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements file transfer resume functionality and fixes a path-related bug in file transfer operations. The main purpose is to allow interrupted file transfers to resume from where they left off rather than starting over.
- Adds resume capability by checking file digests and setting appropriate offset values for partial transfers
- Fixes a bug where
new_receive()
was incorrectly sending local path instead of remote path - Updates job confirmation methods to be asynchronous across the codebase
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/ui_cm_interface.rs | Adds digest setting for jobs and handles SendConfirm messages for file transfers |
src/server/connection.rs | Makes job confirmation asynchronous and forwards SendConfirm to UI when job not found |
src/ipc.rs | Adds SendConfirm variant to FS enum and imports FileTransferSendConfirmRequest |
src/client/io_loop.rs | Implements resume logic with digest checking, fixes path bug, and makes confirmation async |
libs/hbb_common | Updates submodule commit reference |
overwrite
value if the digest is identical and current job is resume.new_receive()
should send the remote path, but it send the local pathp
.Tests
TODOs