Commit 311676ed authored by Wayne Davison's avatar Wayne Davison

Fixed a problem with how the daemon filters deal with

a destination directory with a trailing slash.
parent 4616867b
......@@ -507,12 +507,20 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
if (!dest_path || list_only)
return NULL;
if (daemon_filter_list.head
&& (check_filter(&daemon_filter_list, FLOG, dest_path, 0 != 0) < 0
|| check_filter(&daemon_filter_list, FLOG, dest_path, 1 != 0) < 0)) {
rprintf(FERROR, "skipping daemon-excluded destination \"%s\"\n",
dest_path);
exit_cleanup(RERR_FILESELECT);
if (daemon_filter_list.head) {
char *slash = strrchr(dest_path, '/');
if (slash && slash[1] == '\0')
*slash = '\0';
else
slash = NULL;
if (check_filter(&daemon_filter_list, FLOG, dest_path, 0) < 0
|| check_filter(&daemon_filter_list, FLOG, dest_path, 1) < 0) {
rprintf(FERROR, "skipping daemon-excluded destination \"%s\"\n",
dest_path);
exit_cleanup(RERR_FILESELECT);
}
if (slash)
*slash = '/';
}
/* See what currently exists at the destination. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment