-
Notifications
You must be signed in to change notification settings - Fork 109
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
Interactive mode: subdirectories are not sized in Windows 10 #53
Comments
Thanks for reporting. That's an odd one, as directories are computed by looking at the sizes of all files contained within, recursively. Since I cannot try it on windows myself, a fix would have to be contributed. |
@Byron , I've found the problem at https://github.com/Byron/dua-cli/blob/master/src/traverse.rs#L108.
I have a fix that works for windows that I'll post a PR tomorrow, if you'd like; I still need to test the change on a *nix machine first (my WSL instance doesn't format correctly). |
It's interesting, as the apparently working counterpart for the non-interactive version indeed uses the whole path. This might already be the fix here as well. Ok, I had to try it out - and it really does want to have the filename in the entry, as it will build the path dynamically via the tree - this saves memory. Sorry for not waiting for the PR, I was just too intrigued to finally see this issue go, but I would be happy if you could give it another round of testing on windows to verify this issue is fixed for good. Thanks so much for your investigation and all your help! |
This fixes a long standing issue on windows, #53, which relies on the full path to be used. On linux, it seems to be enough to use the meta-data, which is also passed along. On windows, the path seems to actually be used, explaining why it wonderously didn't work on windows before.
Or so it seems… Life is too short to look into yet another windows-path related issue.
Yep, that was the "working baseline" that I used to trace down the bug and figure out the correction.
No worries. I was fixing it in a different manner... your fix obviously better matches your coding style. 😄 And, it's working on my windows machine! 🚀
Happy to help. BTW, I fixed the disabled tests (see PR #61). |
Awesome! So I will be closing this issue, finally :)! Besides, I wouldn't mind seeing an alternative solution in case you want to share your approach/fix. In any case, if you feel it might be more maintainable or easier to understand, another PR is definitely welcome 👍. |
Nah, it was just a draft and I was still hacking/iterating on it. No grand refactoring is lost with it deleted. 😄
I'm somewhat new at Thanks for the tool and your recent work on the windows/cross-platform story! |
Thank you so much for fixing this issue! |
When executing
dua i
inside a directory in Windows 10 all subdirectories are reported as having a size of 0.0 Bytes.The text was updated successfully, but these errors were encountered: