Don't add st_size from a device to stats.total_size.
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index 05b53f6..110c304 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -963,7 +963,7 @@ skip_filters:
                        file->mode = save_mode;
        }
 
-       if (!S_ISDIR(st.st_mode))
+       if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode))
                stats.total_size += st.st_size;
 
        return file;