Bug 4803 - link-dest folder is not validated
Summary: link-dest folder is not validated
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.0
Hardware: Other Mac OS X
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-19 14:12 UTC by Alan Snelgrove
Modified: 2008-07-26 10:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Snelgrove 2007-07-19 14:12:54 UTC
While I get error messages if the Source or Destination is invalid, I don't get one for an invalid --link-dest . A link-dest of $HOME/... works while ~/...  does not. 
ie 
rsync -avi  --link-dest=$HOME/Desktop/folder2  ~/Desktop/folder1/ ~/Desktop/folder3/
and
rsync -avi  --link-dest=../Desktop/folder2  ~/Desktop/folder1/ ~/Desktop/folder3/
will both hard link,
rsync -avi --link-dest=~/Desktop/folder2  ~/Desktop/folder1/ ~/Desktop/folder3/
does not.
The problem is componded by the lack of a warning message
Comment 1 Wayne Davison 2007-07-19 14:17:05 UTC
A leading ~ is a shell expansion that only occurs at the start of an arg.  If you want the shell to expand it, get rid of the '=' in the --link-dest option:

--link-dest ~/Desktop/folder2

Seems like a good idea to make rsync iterate over the --*-dest args and report problems.
Comment 2 Wayne Davison 2007-12-15 10:23:26 UTC
The version in the git repository now reports on problems with the alternate-basis directories.