extern int read_batch;
extern int write_batch;
-extern struct exclude_struct **exclude_list;
-extern struct exclude_struct **server_exclude_list;
-extern struct exclude_struct **local_exclude_list;
+extern struct exclude_list_struct exclude_list;
+extern struct exclude_list_struct server_exclude_list;
+extern struct exclude_list_struct local_exclude_list;
int io_error;
return 0;
}
}
- if (server_exclude_list
- && check_exclude(server_exclude_list, fname, is_dir,
- "server pattern"))
+ if (server_exclude_list.head
+ && check_exclude(&server_exclude_list, fname, is_dir,
+ "server pattern"))
return 1;
if (exclude_level != ALL_EXCLUDES)
return 0;
- if (exclude_list && check_exclude(exclude_list, fname, is_dir,
- "pattern"))
+ if (exclude_list.head
+ && check_exclude(&exclude_list, fname, is_dir, "pattern"))
return 1;
- if (local_exclude_list
- && check_exclude(local_exclude_list, fname, is_dir,
- "local-cvsignore"))
+ if (local_exclude_list.head
+ && check_exclude(&local_exclude_list, fname, is_dir,
+ "local-cvsignore"))
return 1;
return 0;
}
if (recursive && S_ISDIR(file->mode)
&& !(file->flags & FLAG_MOUNT_POINT)) {
- struct exclude_struct **last_exclude_list = local_exclude_list;
+ struct exclude_list_struct last_list = local_exclude_list;
+ memset(&local_exclude_list, 0, sizeof local_exclude_list);
send_directory(f, flist, f_name_to(file, fbuf));
- local_exclude_list = last_exclude_list;
- return;
+ free_exclude_list(&local_exclude_list);
+ local_exclude_list = last_list;
}
}
offset++;
}
- local_exclude_list = NULL;
-
if (cvs_exclude) {
if (strlcpy(p, ".cvsignore", MAXPATHLEN - offset)
< MAXPATHLEN - offset) {
dir, errno, strerror(errno));
}
- if (local_exclude_list)
- free_exclude_list(&local_exclude_list); /* Zeros pointer too */
-
closedir(d);
}
int modify_window = 0;
int module_id = -1;
-struct exclude_struct **server_exclude_list;
+struct exclude_list_struct server_exclude_list;
void rprintf(UNUSED(enum logcode code), const char *format, ...)
{
exit(code);
}
- int check_exclude(UNUSED(struct exclude_struct **list), UNUSED(char *name),
+ int check_exclude(UNUSED(struct exclude_list_struct *listp), UNUSED(char *name),
UNUSED(int name_is_dir), UNUSED(const char *type))
{
/* This function doesn't really get called in this test context, so
#include "rsync.h"
extern int verbose;
+extern struct exclude_list_struct server_exclude_list;
int sanitize_paths = 0;
static int exclude_server_path(char *arg)
{
char *s;
- extern struct exclude_struct **server_exclude_list;
- if (server_exclude_list) {
+ if (server_exclude_list.head) {
for (s = arg; (s = strchr(s, '/')) != NULL; ) {
*s = '\0';
- if (check_exclude(server_exclude_list, arg, 1,
+ if (check_exclude(&server_exclude_list, arg, 1,
"server pattern")) {
/* We must leave arg truncated! */
return 1;