}
if (inc_recurse && relative_paths && *fbuf) {
- if ((p = strchr(fbuf+1, '/')) != NULL) {
+ if ((p = strchr(fbuf+1, '/')) != NULL
+ && !is_excluded(fbuf, S_ISDIR(st.st_mode) != 0, ALL_FILTERS)) {
if (p - fbuf == 1 && *fbuf == '.') {
if ((fn = strchr(p+1, '/')) != NULL)
p = fn;
if (fn == p)
continue;
}
- } else if (implied_dirs && (p=strrchr(fbuf,'/')) && p != fbuf) {
+ } else if (implied_dirs && (p=strrchr(fbuf,'/')) && p != fbuf
+ && !is_excluded(fbuf, S_ISDIR(st.st_mode) != 0, ALL_FILTERS)) {
/* Send the implied directories at the start of the
* source spec, so we get their permissions right. */
send_implied_dirs(f, flist, fbuf, fbuf, p, flags, 0);