When rsync fails to create a destination directory, it skips through the file list until it reaches a file whose depth is less than or equal to that of the destination directory (saved in missing_below). This is wrong with --no-implied -dirs because the failed directory could be followed by a deeper file whose parent is not in the file list. I reproduced this as follows: $ mkdir src src/a src/b dest dest/b $ echo data >src/b/file $ chmod u-w dest $ find . -ls 1590269 0 drwx------ 4 matt matt 96 Feb 25 12:16 . 1871292 0 drwx------ 4 matt matt 96 Feb 25 12:16 ./src 1881303 0 drwx------ 2 matt matt 48 Feb 25 12:16 ./src/a 1881688 0 drwx------ 2 matt matt 72 Feb 25 12:16 ./src/b 1882255 4 -rw------- 1 matt matt 5 Feb 25 12:16 ./src/b/file 1881706 0 dr-x------ 3 matt matt 72 Feb 25 12:16 ./dest 1882122 0 drwx------ 2 matt matt 48 Feb 25 12:16 ./dest/b $ rsync -i -a --relative --no-implied-dirs src/./a src/./b/file dest/ cd+++++++++ a/ rsync: recv_generator: mkdir "/home/matt/test/missing-below/dest/a" failed: Permission denied (13) *** Skipping everything below this failed directory *** rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9] $ rsync -i -a --relative --no-implied-dirs src/./b/file dest/ >f+++++++++ b/file Notice that rsync skips "b/file" on the first run when "a" also happens to be in the transfer but successfully transfers "b/file" if "a" is not in the transfer. I tried to test this with the current CVS rsync but got the following error, which seems to indicate something awry in the incremental file-list building (rsync tried to access src/src instead of src): $ ~/rsync/rsync/rsync -i -a --relative --no-implied-dirs src/./a src/./b/file dest/ rsync: link_stat "/home/matt/test/missing-below/src/src/./b/file" failed: No such file or directory (2) I think the excluded_below mechanism for daemon filters has the same problem as missing_below.
CVS rsync now does the same thing as rsync 2.6.9 instead of looking for the source files in the wrong place.
I just checked in a fix for this.