avogelba / WinDirStats

WinDirStats - Windows Directory Statistics, private clone from:
https://bitbucket.org/windirstat/windirstat
GNU General Public License v2.0
5 stars 0 forks source link

windirstat follows symlinks resulting in very bogus results #19

Open avogelba opened 10 years ago

avogelba commented 10 years ago

Originally reported by: Oliver (Bitbucket: assarbad, GitHub: assarbad)


Reported by https://sourceforge.net/u/athenae/

I have several symlinks in my home directory that point off to network drives or even different places in the same drives.

I wanted to get a visualization of my home dir space.

It has about 14G in it. (as determined by "du" in cygwin" which knows about windows symlinks and junctions).

Windirstat is showing over 374G and took nearly a half an hour to complete!

Example -- Pictures is a link <-> Documents/Pictures which is a link to my home drive on my server -- so they are not even local! That's an 80G directory that is being counted twice!

I moved several files under AppData/Roaming/ (Adobe, 'a backup agent'), that about 13G of data there -- off to the server and point to them with windows links (mklink /d localdir Remotedir).

It has a Video directory under my Doc files as 40G, but that's off on my server's "S:" drive.

None of this counts that various hard-linked directory copies (very few, which would could as double or triple copies where they are present.

Overall (now that's it's finished...Windirstat numbers 374G, real space on disk under my home dir: 14G.

Um....While it is interesting and perhaps amusing to see what my 'virtual' home directory size is (i.e. a 'follow symlinks option), it's not too useful when trying to look at actual space.

sigh.

Damn MS! They keep adding things! (though I've used junctions since XP days, the win-symlinks are a godsend!).


I remarked:

Symlinks are reparse points, just like folder junction points (and some others, e.g. SIS). What are your settings for following junctions and crossing file system boundaries?


OP remarked:

What settings, where? Since I'm not sure what you are talking about, I would guess I'm taking the default settings setup by MS, for Windows, and the default setting setup by windirstat authors (you?) for windirstat? But not sure, since I'm not sure what settings you are referring to.


I remarked:

In the main menu "Options" -> "Configure WinDirStat". The first tab which opens there will have options for volume mount points and folder junction points, but I think the implementation of it should also disregard other types of reparse points (such as symlinks).

// Oliver


https://sourceforge.net/u/appleeater10/ remarked:

Just mentioning that I experience the same issue. Win7 64 bit, symlinks on one drive (Drive C:) to files on another drive (Drive E:) are included in the filesize calculation and the directory map. "Cross filesystem boundaries" and "Follow junction points" are disabled.


https://sourceforge.net/u/sandwiched/ remarked:

bump

It might be rather obvious, but I just wanted to add that I use WDS to determine what is occupying space inside a drive or folder.

To that end, I can't think of a single situation where a symlink should be followed and included. If a symlink/junction points to another location outside the selected drive or folder, it should definitely be ignored. If a symlink/junction is merely acting as a shortcut of sorts, pointing to a location also accessible via regular directory traversal further down the directory tree, it should also be ignored.

Does that help any?


avogelba commented 10 years ago

Original comment by InfernoZeus (Bitbucket: InfernoZeus, GitHub: InfernoZeus):


I think this is a duplicate of issue #5 (and closely related to #53).

avogelba commented 10 years ago

Original comment by Andrew Wiley (Bitbucket: debio, GitHub: debio):


Guessing this is related - my apologies if it needs to be a separate issue. On Windows 8.1, the builtin SkyDrive client uses reparse points to store stub files on the local machine that are "rehydrated" to full files on demand. This has the nice effect that SkyDrive files don't take up space unless you need them. It looks like WinDirStat is ignoring the reparse points and counting the full file size in its scan. Specifically, I can see a number of large files in WinDirStat's results, but if I check the files manually, they'll show "Size: [some large number]; Size on disk: 0 bytes" in Explorer.

Cross File System Boundaries and Follow Junction Points are both unchecked in the settings dialog.