From 1b85e3f1a0792a9799c96123a15c1ec75f3be7ce Mon Sep 17 00:00:00 2001 From: David Dykstra Date: Wed, 11 Dec 2002 18:48:27 +0000 Subject: [PATCH] When a file shows up as not existent during an rsync run, always check to see if it excluded before reporting an error. Previously it was only checking for the exclusion if copy_links was enabled, but the error can also occur if a file disappears during an rsync run. Suggested by Eugene V. Chupriyanov and Bo Kersey. --- NEWS | 3 +++ flist.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index fe1e75f1..39643896 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,9 @@ rsync changes since last release unchanged files are hard-linked in to the destination directory. (J.W. Schultz) + * Don't report an error if an excluded file disappears during an + rsync run. (Eugene Chupriyanov and Bo Kersey) + BUG FIXES: * Fix "forward name lookup failed" errors on AIX 4.3.3. (John diff --git a/flist.c b/flist.c index 1dee24cd..922db461 100644 --- a/flist.c +++ b/flist.c @@ -660,8 +660,10 @@ struct file_struct *make_file(int f, char *fname, struct string_area **ap, if (readlink_stat(fname, &st, linkbuf) != 0) { int save_errno = errno; - if ((errno == ENOENT) && copy_links && !noexcludes) { - /* symlink pointing nowhere, see if excluded */ + if ((errno == ENOENT) && !noexcludes) { + /* either symlink pointing nowhere or file that + * was removed during rsync run; see if excluded + * before reporting an error */ memset((char *) &st, 0, sizeof(st)); if (check_exclude_file(f, fname, &st)) { /* file is excluded anyway, ignore silently */ -- 2.34.1