When a file shows up as not existent during an rsync run, always check
authorDavid Dykstra <dwd@samba.org>
Wed, 11 Dec 2002 18:48:27 +0000 (18:48 +0000)
committerDavid Dykstra <dwd@samba.org>
Wed, 11 Dec 2002 18:48:27 +0000 (18:48 +0000)
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
flist.c

diff --git a/NEWS b/NEWS
index fe1e75f..3964389 100644 (file)
--- 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 1dee24c..922db46 100644 (file)
--- 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 */