Bug 1414 - Using --relative (-R) with root-level files can transfer the wrong data
Summary: Using --relative (-R) with root-level files can transfer the wrong data
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.1
Hardware: All All
: P3 critical (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-30 02:18 UTC by Wayne Davison
Modified: 2004-05-30 02:20 UTC (History)
0 users

See Also:


Attachments
Fix the file-name sort (525 bytes, patch)
2004-05-30 02:19 UTC, Wayne Davison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne Davison 2004-05-30 02:18:10 UTC
There is a bug in the internal sorting of the file list that only affects the
--relative option when files are specified at the root, e.g. "/" and "/*". 
(Note: this "rootness" also affects modules with chroot set.)

The symptons are that some files are transferred with data from another file.
Avoiding unnecessary use of the -R option is the easiest way to avoid this
biting you.
Comment 1 Wayne Davison 2004-05-30 02:19:14 UTC
Created attachment 533 [details]
Fix the file-name sort

The code in f_name_cmp() would sort a name wrong if it had a dirname value that
was an empty string (not a NULL string).  This patches fixes the sort to work
just like older versions are expecting.
Comment 2 Wayne Davison 2004-05-30 02:20:00 UTC
Fix has been checked into CVS for release.
Comment 3 Wayne Davison 2004-05-30 02:20:24 UTC
Fix released in 2.6.2.