+--- orig/clientserver.c 2004-08-02 02:29:16
++++ clientserver.c 2004-08-09 02:25:28
+@@ -48,9 +48,10 @@ extern int no_detach;
+ extern int default_af_hint;
+ extern char *bind_address;
+ extern struct exclude_list_struct server_exclude_list;
+-extern char *exclude_path_prefix;
+ extern char *config_file;
+ extern char *files_from;
++extern char dirbuf[MAXPATHLEN];
++extern unsigned int dirbuf_offset;
+
+ char *auth_user;
+
+@@ -300,26 +301,27 @@ static int rsync_module(int f_in, int f_
+ /* TODO: Perhaps take a list of gids, and make them into the
+ * supplementary groups. */
+
+- exclude_path_prefix = use_chroot? "" : lp_path(i);
+- if (*exclude_path_prefix == '/' && !exclude_path_prefix[1])
+- exclude_path_prefix = "";
++ if (use_chroot)
++ set_current_subdir("", 0);
++ else
++ set_current_subdir(lp_path(i), strlen(lp_path(i)));
+
+ p = lp_include_from(i);
+ add_exclude_file(&server_exclude_list, p,
+- XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE);
++ XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE | XFLG_ABS_PATH);
+
+ p = lp_include(i);
+ add_exclude(&server_exclude_list, p,
+- XFLG_WORD_SPLIT | XFLG_DEF_INCLUDE);
++ XFLG_WORD_SPLIT | XFLG_DEF_INCLUDE | XFLG_ABS_PATH);
+
+ p = lp_exclude_from(i);
+ add_exclude_file(&server_exclude_list, p,
+- XFLG_FATAL_ERRORS);
++ XFLG_FATAL_ERRORS | XFLG_ABS_PATH);
+
+ p = lp_exclude(i);
+- add_exclude(&server_exclude_list, p, XFLG_WORD_SPLIT);
++ add_exclude(&server_exclude_list, p, XFLG_WORD_SPLIT | XFLG_ABS_PATH);
+
+- exclude_path_prefix = NULL;
++ set_current_subdir("", 0);
+
+ log_init();
+