If lp_path() returns "/", set exclude_path_prefix to "" (because the
authorWayne Davison <wayned@samba.org>
Thu, 11 Sep 2003 04:00:19 +0000 (04:00 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 11 Sep 2003 04:00:19 +0000 (04:00 +0000)
exclude code doesn't want any trailing slashes).

clientserver.c

index 305f6e61cb12860e394150c3a482b9c8eddb97df..5c931fa6f8385c2cffba4986ba71053f85c24db2 100644 (file)
@@ -294,6 +294,8 @@ static int rsync_module(int f_in, int f_out, int i)
         * supplementary groups. */
 
        exclude_path_prefix = use_chroot? "" : lp_path(i);
+       if (*exclude_path_prefix == '/' && !exclude_path_prefix[1])
+               exclude_path_prefix = "";
 
        p = lp_include_from(i);
        add_exclude_file(&server_exclude_list, p, MISSING_FATAL, ADD_INCLUDE);