Fix old stats bug that counted devices as symlinks.
authorWayne Davison <wayne@opencoder.net>
Wed, 17 May 2023 05:44:54 +0000 (22:44 -0700)
committerWayne Davison <wayne@opencoder.net>
Wed, 17 May 2023 05:44:54 +0000 (22:44 -0700)
NEWS.md
delete.c
flist.c

diff --git a/NEWS.md b/NEWS.md
index 56224009141aaf476bb1fcd4d070eae96db21a6d..ca60c32cb282d26c1c0efea4403c280889729368 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -30,6 +30,8 @@
 
 - Fixed `rsync -VV` on Cygwin -- it needed a flush of stdout.
 
+- Fixed an old stats bug that counted devices as symlinks.
+
 ### ENHANCEMENTS:
 
 - Enhanced rrsync with the `-no-overwrite` option that allows you to ensure
index 4a29485302cb8cf0ed6f861d7c2dfc787ad792a7..807661643648308ae5a138795f63cf3b2daa7ca0 100644 (file)
--- a/delete.c
+++ b/delete.c
@@ -188,7 +188,7 @@ enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
                                stats.deleted_symlinks++;
 #endif
                        else if (IS_DEVICE(mode))
-                               stats.deleted_symlinks++;
+                               stats.deleted_devices++;
                        else
                                stats.deleted_specials++;
                }
diff --git a/flist.c b/flist.c
index 311bbcf1e2e3291dc1c580522aea5d873142c382..464d556ec906a572d2c378ac79e6d0fa169dd003 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -2659,7 +2659,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
                } else if (S_ISLNK(file->mode))
                        stats.num_symlinks++;
                else if (IS_DEVICE(file->mode))
-                       stats.num_symlinks++;
+                       stats.num_devices++;
                else
                        stats.num_specials++;