andrewhayden / folderslice

Automatically exported from code.google.com/p/folderslice
0 stars 0 forks source link

Gadget doesn't process hidden/system files #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a hidden or system file in a directory and try to scan it
2. The file is not counted

What is the expected output? What do you see instead?
Hidden/system files/folders should be processed.

Please use labels and text to provide additional information.
It should be possible to do this using the ActiveX control
FileSystemObject.getFolder().Files property and
FileSystemObject.getFolder().SubFolders property.

This will involve completely removing the current use of System.Shell.Item
since it is incapable of dealing with this properly.  System.Shell.Item is
unable to access these types of resources.

We should also list the number of hidden/system (as simply "hidden") in the
summary.

Original issue reported on code.google.com by andrew.h...@gmail.com on 9 Dec 2007 at 11:24

GoogleCodeExporter commented 9 years ago
This turns out to be a much harder problem.

It is true that FileSystemObject.SubFolders/Files lists hidden directories;
unfortunately it also lists links, and does not follow them.  Meaning that  a 
full
filesystem traversal may encounter the same physical file multiple times. 
Additionally, System.Shell can't be used to follow links because it cannot 
access
hidden or system files, which most of the links seem to be.

I tried creating a hybrid System.Shell + FileSystemObject approach, but it 
enormously
increased the complexity of the application, grossly decreased its speed, and
ultimately still ended up with duplicates because System.Shell can't "see"
hidden/system files.

Unfortunately I see no way around this with the current APIs.  I'll leave the 
issue
open in case MS decides to fix the API but this issue will probably be unfixed 
for
quite some time.

Original comment by andrew.h...@gmail.com on 11 Dec 2007 at 8:17

GoogleCodeExporter commented 9 years ago
Tagging as Microsoft Bug.  Can't fix till MS fixes their API.

Original comment by andrew.h...@gmail.com on 12 Dec 2007 at 7:28