Tuesday, March 27, 2018

Windows Explorer Bug - Properties shows Incorrect/Wrong File And Folder Counts

Yours truly has found a Windows Explorer bug starting from Windows XP (2001) and continue to this day in Windows 10. It involves one of the most basic and fundamental apps to Windows and that is Windows Explorer. This is still is an issue for the latest build of Microsoft Windows 10 Pro 1803 (10.0.17134.112).

There's another bug I found more recently, in regards to counts when path is too long.


Here's the bug, basically when you want to get the total file and folder counts for a specific sub-directory, the counts are incorrect. Essentially, 

When opening Windows Explorer Properties for a folder that contains directory symbolic links or re-parse points, but the count does not include directory symbolic links re-parse points. 

In the Window Explorer pop-up Properties windows, the directory symbolic links and re-parse points are simply not enumerated. The incorrect result is seen in image 1 below.

In Image 1, we are using "testshort" directory as our showcase test directory. In the Window Explorer pop-up Properties window; 
  • we have summary: Contains 7 Files, 4 Folders for total of 11 (which is incorrect)
This contradicts the main windows details pane where for directory "testshort" we have following details; 

  • 10 Directories - counting the number of items with Type column having "File Folder" 
  • 7 Files - in Type column we have  (File, Shortcut, Text Document and .symlink) categories
Moreover, if you examine lower left-hand corner we have a total of 15 items, not 17 in total. Lots of errors found here. 


Image 1: Pop-up 7 Files , 4 Folders = 11 total (incorrect), 15 Items in main window (also incorrect)
This contradicts findings using DOS. Doing a 'dir' cmd, directory symbolic links and re-parse points are considered directories. 

For a corroborating viewpoint, in DOS we have the correct enumeration for the same directory;
  1. 10 Directories (10 less 2 ('.' and '..') = 7 dirs  
  2. 7 Files 
Image 2 : 17 Files - 10 Directories and 7 Files, correct




















April 10, 2018 Update - Using the recently Microsoft has open sourced Windows File Manager (WinFile) code which was last delivered in  Windows ME (2000), release on Github. You can download a compiled WinFile.exe, which I used below to run on Windows 10. 

WinFile identifies directory symbolic links but not re-parse points (junctions). Junctions are not enumerated at all. 

Img 3 : 13 Files - 6 Directories and 7 Files






No comments:

Post a Comment