Skip to content

Conversation

fufesou
Copy link
Collaborator

@fufesou fufesou commented Aug 6, 2025

  1. Feat. File transfer resume. Reset the overwrite value if the digest is identical and current job is resume.
image
  1. Fix. new_receive() should send the remote path, but it send the local path p.
image

Tests

  • Windows <-> MacOS. New <-> Old, New <-> New.
  • Windows <-> Android. New <-> Old, New <-> New.

TODOs

  1. Web.
  2. Load last file transfer jobs sometimes does not work fine on reconnection.

@fufesou fufesou requested a review from Copilot August 6, 2025 03:09
Copilot

This comment was marked as outdated.

@fufesou fufesou force-pushed the feat/file_transfer_resume branch 2 times, most recently from 6304737 to 72e039f Compare August 6, 2025 03:16
@fufesou fufesou requested a review from Copilot August 6, 2025 03:16
Copilot

This comment was marked as outdated.

@fufesou fufesou force-pushed the feat/file_transfer_resume branch from 72e039f to ae602f1 Compare August 6, 2025 03:19
@fufesou fufesou requested a review from Copilot August 6, 2025 03:20
Copy link
Contributor

@Copilot Copilot AI left a 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

@fufesou fufesou force-pushed the feat/file_transfer_resume branch from ae602f1 to c803776 Compare August 6, 2025 03:33
@fufesou fufesou requested a review from Copilot August 6, 2025 03:33
Copilot

This comment was marked as outdated.

@rustdesk rustdesk requested a review from Copilot August 6, 2025 08:24
Copilot

This comment was marked as outdated.

@fufesou fufesou requested a review from Copilot August 6, 2025 08:41
Copilot

This comment was marked as outdated.

Signed-off-by: fufesou <linlong1266@gmail.com>
@fufesou fufesou force-pushed the feat/file_transfer_resume branch from c803776 to 84e9c2a Compare August 6, 2025 15:31
@fufesou fufesou requested a review from Copilot August 6, 2025 15:34
Copy link
Contributor

@Copilot Copilot AI left a 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

@rustdesk rustdesk merged commit 43ec57c into rustdesk:master Aug 9, 2025
21 checks passed
rustdesk added a commit that referenced this pull request Aug 11, 2025
rustdesk added a commit that referenced this pull request Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants