Repository navigation
Use rsync --protect-args in the rsync upload/download example - #1647
Merged
Merged
Conversation
Without -s the remote path (destination on upload, source on download) and --link-dest go through the remote shell command line. rsync >= 3.2.4 and distro-patched older builds backslash-escape them, but unpatched older rsync lets the remote shell word-split paths with spaces. -s sends the arguments over the rsync protocol instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 40634441227Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.04%) to 70.41%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions20 previously-covered lines in 7 files lost coverage.
Coverage Stats
💛 - Coveralls |
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.
Follow-up to #1639.
Adds
-s(--protect-args) to the rsync calls intest/integration/rsync/upload.shanddownload.sh, so the remote path and--link-destreach the remote rsync over the rsync protocol instead of the remote shell command line.rsync >= 3.2.4 (and distro builds with backported escaping, e.g. Ubuntu 20.04's 3.1.3) already backslash-escape these arguments, so on those versions this changes nothing. It protects against unpatched older rsync, where the remote shell would word-split a path containing spaces. Remote wildcards are still expanded (by rsync itself under
-s).Verified:
TestCustomRsyncpasses locally./remote dir*/...path on rsync 3.1.3 (Ubuntu 20.04), 3.2.5 and 3.5.0: upload with--link-desthard-links unchanged files (link count 2) and download works, with and without-s.🤖 Generated with Claude Code