Incidencia #42852

Item count incorrect after deleting a directory

Abrir Fecha: 2021-09-11 03:41 Última actualización: 2021-12-08 06:04

Open [Owner assigned]
5 - Medium
5 - Medium


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.

Ticket History (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
  • Prioridad Update from 7 to 5 - Medium
  • Summary Updated
2021-12-08 06:04 Updated by: assarbad
  • Propietario Update from (Ninguno) 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. » Entrar