#endif
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run perform a trial run with no changes made\n");
#endif
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run perform a trial run with no changes made\n");
rprintf(F," -x, --one-file-system don't cross filesystem boundaries\n");
rprintf(F," -B, --block-size=SIZE force a fixed checksum block-size\n");
rprintf(F," -e, --rsh=COMMAND specify the remote shell to use\n");
rprintf(F," -x, --one-file-system don't cross filesystem boundaries\n");
rprintf(F," -B, --block-size=SIZE force a fixed checksum block-size\n");
rprintf(F," -e, --rsh=COMMAND specify the remote shell to use\n");
arg = sanitize_path(NULL, arg, NULL, 0);
if (server_filter_list.head) {
int rej;
arg = sanitize_path(NULL, arg, NULL, 0);
if (server_filter_list.head) {
int rej;
- clean_fname(cp, CFN_COLLAPSE_DOT_DOT_DIRS);
- rej = check_filter(&server_filter_list, cp, 0) < 0;
+ dir = cp + (*cp == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ rej = check_filter(&server_filter_list, dir, 0) < 0;
if (read_batch && files_from) {
snprintf(err_buf, sizeof err_buf,
"--read-batch cannot be used with --files-from\n");
if (read_batch && files_from) {
snprintf(err_buf, sizeof err_buf,
"--read-batch cannot be used with --files-from\n");
- clean_fname(tmpdir, CFN_COLLAPSE_DOT_DOT_DIRS);
- if (check_filter(elp, tmpdir, 1) < 0)
+ dir = tmpdir + (*tmpdir == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ if (check_filter(elp, dir, 1) < 0)
- clean_fname(backup_dir, CFN_COLLAPSE_DOT_DOT_DIRS);
- if (check_filter(elp, backup_dir, 1) < 0)
+ dir = backup_dir + (*backup_dir == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ if (check_filter(elp, dir, 1) < 0)
if (sanitize_paths)
files_from = sanitize_path(NULL, files_from, NULL, 0);
if (server_filter_list.head) {
if (sanitize_paths)
files_from = sanitize_path(NULL, files_from, NULL, 0);
if (server_filter_list.head) {
- clean_fname(files_from, CFN_COLLAPSE_DOT_DOT_DIRS);
- if (check_filter(&server_filter_list, files_from, 0) < 0)
+ dir = files_from + (*files_from == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ if (check_filter(&server_filter_list, dir, 0) < 0)