aboutsummaryrefslogtreecommitdiffstats
path: root/flist.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-11-11 16:44:22 +0000
committerWayne Davison <wayned@samba.org>2006-11-11 16:44:22 +0000
commit5303941021034f9b6272d5c1512096e125aece1e (patch)
tree11e10d445d2bc708eb989e29cae14300fe4236c2 /flist.c
parentc0f1e57b5184c7a3a8872f2d213f45675888a6bf (diff)
downloadandroid_external_rsync-5303941021034f9b6272d5c1512096e125aece1e.tar.gz
android_external_rsync-5303941021034f9b6272d5c1512096e125aece1e.tar.bz2
android_external_rsync-5303941021034f9b6272d5c1512096e125aece1e.zip
If ignore_perishable is set, increment a count of all excluded
items found by make_file().
Diffstat (limited to 'flist.c')
-rw-r--r--flist.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/flist.c b/flist.c
index 9a493af6..a61eaef7 100644
--- a/flist.c
+++ b/flist.c
@@ -48,6 +48,8 @@ extern int preserve_uid;
extern int preserve_gid;
extern int relative_paths;
extern int implied_dirs;
+extern int ignore_perishable;
+extern int non_perishable_cnt;
extern int prune_empty_dirs;
extern int copy_links;
extern int copy_unsafe_links;
@@ -753,8 +755,11 @@ struct file_struct *make_file(char *fname, struct file_list *flist,
/* See if file is excluded before reporting an error. */
if (filter_level != NO_FILTERS
&& (is_excluded(thisname, 0, filter_level)
- || is_excluded(thisname, 1, filter_level)))
+ || is_excluded(thisname, 1, filter_level))) {
+ if (ignore_perishable && save_errno != ENOENT)
+ non_perishable_cnt++;
return NULL;
+ }
if (save_errno == ENOENT) {
#ifdef SUPPORT_LINKS
/* Avoid "vanished" error if symlink points nowhere. */
@@ -804,8 +809,11 @@ struct file_struct *make_file(char *fname, struct file_list *flist,
flags |= FLAG_MOUNT_POINT;
}
- if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level))
+ if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
+ if (ignore_perishable)
+ non_perishable_cnt++;
return NULL;
+ }
if (lp_ignore_nonreadable(module_id)) {
#ifdef SUPPORT_LINKS