When a file shows up as not existent during an rsync run, always check
[rsync/rsync.git] / flist.c
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 */