任务单 #42852

Item count incorrect after deleting a directory

开放日期: 2021-09-11 03:41 最后更新: 2021-12-08 06:04

报告人:
属主:
类型:
状态:
开启 [Owner assigned]
组件:
(无)
里程碑:
(无)
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
文件:

Details

This bug is very easy to reproduce. Create a directory called dirx. Inside it another directory called diry. Inside it another directory called dirz. Inside it a file called "file.txt". Filenames are not important, this is just an example.

Open dirx in windirstat. In this example it's on my desktop, but the location doesn't matter. You will see this:

                            Files   Items
-------------------------------------------
C:\Users\you\Desktop\dirx   1       3
+- diry                     1       2
   +- dirz                  1       1
     +- file.txt

So inside dirx are 3 items (diry, dirz and file.txt). The item number does not include the directory itself, as expected. This matches with WinDirStat's documentation which says: "Items: Number of items in the subtree. Sum of Files and Subdirs." So this is correct, no bugs here.

Now right-click on dirz and click Delete (or press Del on your keyboard). The view is updated to this:

                            Files   Items
-------------------------------------------
C:\Users\you\Desktop\dirx   0       2
+- diry                     0       1

These numbers are wrong. The number of items in the root is now 2, while we expect to see 1. If you right-click on either dirx or diry, and select refresh (or select it and press F5), the numbers are fixed:

                            Files   Items
-------------------------------------------
C:\Users\you\Desktop\dirx   0       1
+- diry                     0       0

So to summarize the bug: the item count is not updated correctly when you delete a directory.

任务单历史 (3/3 Histories)

2021-09-11 03:41 Updated by: gerben
  • New Ticket "Items counted incorrectly" created
2021-09-11 03:49 Updated by: gerben
  • 优先 Update from 7 to 5 - Medium
  • Summary Updated
2021-12-08 06:04 Updated by: assarbad
  • 属主 Update from (无) to assarbad

Attachment File List

No attachments

编辑

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登录名