From 6f3c5eccee6cf4dead68b9f3fda8fc2ff90dc311 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 16 May 2023 22:44:54 -0700 Subject: [PATCH] Fix old stats bug that counted devices as symlinks. --- NEWS.md | 2 ++ delete.c | 2 +- flist.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 562240091..ca60c32cb 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 4a2948530..807661643 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 311bbcf1e..464d556ec 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++; -- 2.47.3