fix(sync): report actual transfer count instead of "no files transferred"#42
Merged
Conversation
- Always pass --stats so transfer counts are present in output - Update regex to match rsync 3.x "Number of regular files transferred" - Accept dots as thousand separators in size/speed patterns
Owner
|
Thanks a lot @MakksSh! 🙏 Merged and shipped in v3.6.3. Spot-on diagnosis — the
Available now: |
Contributor
Author
|
Great! I'm happy to help with the product's development! I use it regularly, and it solves many of my problems when working with agents. 🤝 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When AI agents use
ssh_sync, the tool always reports "No files needed to be transferred" even when files are actually synced. This causes agents to:Root cause
Two issues in rsync output parsing:
--statsflag is only added whenverboseis enabled. Without it, rsync produces no statistics lines, so the regex match returnsnullandfilesTransferredstays at0, triggering the false "no files" message.Regex patterns are written for rsync 2.x only. rsync 3.x (standard on modern distros) changed the output format from
Number of files transferred: NtoNumber of regular files transferred: N. The old regex misses the wordregularand never matches.Fix
--statsto rsync regardless ofverbosesettingNumber of (regular )?files transferred: N.as thousand separator in size/speed values for locale compatibilityVerified
Tested live with
ssh_syncpush to a remote server. Before fix: "No files needed to be transferred". After fix: "Files transferred: 1, Total size: 0.04 KB".