Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ntfs special file support, closes #9 #10

Merged
merged 23 commits into from
Nov 9, 2015

Conversation

ariccio
Copy link
Owner

@ariccio ariccio commented Nov 9, 2015

This pull request ended up much larger than the branch name (add-NTFS-special-file-support) sounds.

In pursuit of 100% used-space-accounting-for (as NTFS "misreports" free space), altWinDirStat now displays the size of the NTFS Master File Table, and I've implemented experimental support for displaying the sizes of other NTFS metafiles.

I've also fixed the annoying issue (#9) where running altWinDirStat for the first time - only where the vanilla version of WinDirStat has also not been run - would display a garbled file tree & file type list.

That bug wasn't visible on my dev machine because I never actually deleted the registry key where settings are stored. Oliver Schneider & Bernhard Seifert included Delete HKCU\Software\seifert\windirstat in the original test plan, which I don't really use. Shame on me.

This pull request does suffer from one regression: working with very large folders (number of items) is a bit slower, sadly. I fixed an annoying bug where the last item in the list view would appear after the parent folder had been collapsed. I refer to it as a "zombie item".

As an example, here's the my AppData folder, expanded:
wds_nozombie

Here it is, collapsed, with "zombie item":
wds_zombie

Here's the collapsed folder, without the "zombie item" (fixed):
wds_fixedzombie


Backend changes:

  • I replaced many uses of CDC with the raw HDC, which improves const-correctness, and allows me to check return values where MFC doesn't.
  • I replaced some CTreeListItem*s with const CTreeListItem*s.
  • Added some TRACEs.

... but the code is SHIT
Can't actually remember what triggered this, but we're more
const-correct because of it, and use fewer of the evil CDCs.
The problem (I THINK!) was in the VIEW, **NOT** the CONTROL. Hence the
extra call to CWnd::RedrawWindow() in
CDirstatView::OnUpdateHINT_SHOWNEWSELECTION().
I wasn't setting the default value for column widths/order when no
registry value exists, thus columns were zero-initialized. This fixes
the issue by setting a default value - the functionality was there, but
I'd not actually passed a default value in as a string. Duh.

I'm using some heap for string formatting here, but I can fix that
later.
How'd I miss this?
Reverse engineered actual queries with API Monitor.
Some performance issues (large list only) resurfaced as part of fixing
the last item zombie-item bug
(712e81b). This is a partial fix of the
performance issues.
@ariccio
Copy link
Owner Author

ariccio commented Nov 9, 2015

I created this PR to help keep track of history. I'm merging and closing.

ariccio added a commit that referenced this pull request Nov 9, 2015
@ariccio ariccio merged commit 87481ea into master Nov 9, 2015
@ariccio ariccio deleted the add-NTFS-special-file-support branch November 9, 2015 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant