Skip to content

Fix --link-dest quoting in the rsync upload example - #1639

Merged
Slach merged 2 commits into
Altinity:masterfrom
guoard:fix_rsync_link_dest_quoting
Oct 27, 2026
Merged

Slach merged 2 commits into
Altinity:masterfrom
guoard:fix_rsync_link_dest_quoting

Conversation

@guoard

@guoard guoard commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

The single quotes inside DIFF_FROM_REMOTE_CMD survive the unquoted expansion, so rsync reports "--link-dest arg does not exist" and copies every file instead of hard-linking unchanged parts.

guoard and others added 2 commits October 26, 2026 11:28
The single quotes inside DIFF_FROM_REMOTE_CMD survive the unquoted
expansion, so rsync reports "--link-dest arg does not exist" and copies
every file instead of hard-linking unchanged parts.

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
An unquoted string expansion still word-splits and globs the path, so
--link-dest broke on directories with spaces or glob characters. A bash
array keeps the path as one argument; the ${arr[@]+...} form keeps
set -u happy on bash < 4.4 when no --diff-from-remote is given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Slach
Slach merged commit 9b7037a into Altinity:master Oct 27, 2026
30 checks passed
@Slach

Slach commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

@guoard thanks for your contribution

@guoard
guoard deleted the fix_rsync_link_dest_quoting branch October 27, 2026 06:54
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