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

Count the size of the directories when calculating the size in DirInfo #3902

Merged
merged 2 commits into from Aug 7, 2021

Conversation

hedonihilist
Copy link
Contributor

I noticed that the size and blocks in DirInfo struct only take account of the sizes and blocks of files in that directory(recursively), which resulting in the inaccuracy output of du command. Since the directories do take actual disk space, I guess it will make more sense if we take the size of sub-directories into consideration when calculating the size in DirInfo.

@hedonihilist hedonihilist changed the title Count the size of the directory itself when calculating the size in DirInfo Count the size of the directories when calculating the size in DirInfo Aug 6, 2021
@sophiajt
Copy link
Member

sophiajt commented Aug 7, 2021

Nice catch

@sophiajt sophiajt merged commit c9b87c4 into nushell:main Aug 7, 2021
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.

None yet

2 participants