Bug 8284 - hfs-compression.diff patch incorrectly expands relative directory
Summary: hfs-compression.diff patch incorrectly expands relative directory
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.9
Hardware: x64 Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-03 14:10 UTC by RutleCorps
Modified: 2011-07-04 22:35 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RutleCorps 2011-07-03 14:10:11 UTC
There is a bug when using a relative path for the destination with the hfs-compression.diff patch and --hfs-compression option.  (Note that this bug is not present with the --protect-decmpfs option)

The Destination: $HOME/Desktop/Untitledfolder2 works as expected, however if, from my Home Directory I use Desktop/Untitledfolder2,  the relative path Desktop/Untitledfolder2 is incorrectly expanded to "/Users/Tony/Desktop/Untitledfolder2/Desktop/Untitledfolder2"  

----------
/usr/local/bin/rsync -aNHAXv --hfs-compression --fileflags --force-change --delete Desktop/Untitledfolder1/ Desktop/Untitledfolder2 

sending incremental file list
rsync: statfs "/Users/Tony/Desktop/Untitledfolder2/Desktop/Untitledfolder2" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(514) [Receiver=3.0.8]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.8]
Comment 1 Wayne Davison 2011-07-04 22:35:02 UTC
Looks like hfs_receiver_check() should always test ".", not try to test dest_path (since the caller already did a chdir to dest_path).  Fix committed.