rsyncd listing of directories

Alberto Accomazzi aaccomazzi at
Wed May 22 06:52:01 EST 2002

I just took a look at the 2.5.5 codebase to see how easy it would be to
write a little driver script that downloads a big directory tree from an
rsync daemon the chunky way (get a list of a module's subdirectories and
do the transfer by subdirectory).  The reason for doing this is obvious
when you have large directory trees, as is the case for many of us.
Unfortunately the way list_only is currently implemented makes the whole
idea useless since it forces the daemon to recurse the target directory
tree anyways.  Here's the code:

in options.c:

        /* this is a complete hack - blame Rusty 

           this is a hack to make the list_only (remote file list)
           more useful */
        if (list_only && !recurse) 
                argstr[x++] = 'r';

in exclude.c:

        /* This is a complete hack - blame Rusty.
         * FIXME: This pattern shows up in the output of
         * report_exclude_result(), which is not ideal. */
        if (list_only && !recurse) {
                add_exclude("/*/*", 0);

So I'm going to bite and blame Rusty at this point and ask the question: 
why was this implemented this way?  I can't think of a good reason why.  
I'm happy to try and work on a patch if there is a consensus that this 
is desireable.

-- Alberto

Alberto Accomazzi                          mailto:aaccomazzi at
NASA Astrophysics Data System            
Harvard-Smithsonian Center for Astrophysics
60 Garden Street, MS 83, Cambridge, MA 02138 USA   

More information about the rsync mailing list