extern int filesfrom_fd;
extern int connect_timeout;
extern pid_t cleanup_child_pid;
+extern unsigned int module_dirlen;
extern struct stats stats;
extern char *filesfrom_host;
extern char *partial_dir;
rprintf(FINFO, "total size is %s speedup is %.2f%s\n",
human_num(stats.total_size),
(double)stats.total_size / (total_written+total_read),
- dry_run ? " (DRY RUN)" : "");
+ write_batch < 0 ? " (BATCH ONLY)" : dry_run ? " (DRY RUN)" : "");
}
fflush(stdout);
int i, argc = 0;
char *args[MAX_ARGS];
pid_t ret;
- char *dir = NULL;
int dash_l_set = 0;
if (!read_batch && !local_server) {
ret = piped_child(args, f_in_p, f_out_p);
}
- if (dir)
- free(dir);
-
return ret;
oom:
int exit_code;
struct file_list *flist;
char *local_name = NULL;
- char *dir = NULL;
int save_verbose = verbose;
if (filesfrom_fd >= 0) {
}
if (argc > 0) {
- dir = argv[0];
+ char *dir = argv[0];
argc--;
argv++;
if (!am_daemon && !push_dir(dir, 0)) {
check_alt_basis_dirs();
if (server_filter_list.head) {
- char **dir;
+ char **dir_p;
struct filter_list_struct *elp = &server_filter_list;
- for (dir = basis_dir; *dir; dir++) {
- if (check_filter(elp, *dir, 1) < 0)
+ for (dir_p = basis_dir; *dir_p; dir_p++) {
+ char *dir = *dir_p;
+ if (*dir == '/')
+ dir += module_dirlen;
+ if (check_filter(elp, dir, 1) < 0)
goto options_rejected;
}
if (partial_dir && *partial_dir == '/'
- && check_filter(elp, partial_dir, 1) < 0) {
+ && check_filter(elp, partial_dir + module_dirlen, 1) < 0) {
options_rejected:
rprintf(FERROR,
"Your options have been rejected by the server.\n");