From: Wayne Davison Date: Wed, 17 May 2023 05:44:54 +0000 (-0700) Subject: Fix old stats bug that counted devices as symlinks. X-Git-Tag: v3.3.0~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f3c5eccee6cf4dead68b9f3fda8fc2ff90dc311;p=thirdparty%2Frsync.git Fix old stats bug that counted devices as symlinks. --- diff --git a/NEWS.md b/NEWS.md index 56224009..ca60c32c 100644 --- 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 diff --git a/delete.c b/delete.c index 4a294853..80766164 100644 --- 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 311bbcf1..464d556e 100644 --- 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++;