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

Check for nested files when calculating the total #20

Closed

Conversation

marcospb19
Copy link

Fixes #12

src/lib.rs Outdated Show resolved Hide resolved
@marcospb19
Copy link
Author

There is some miscalculation that needs to be fixed in the TriePathNode logic.

@marcospb19 marcospb19 marked this pull request as draft October 4, 2021 22:57
src/lib.rs Outdated Show resolved Hide resolved
@marcospb19 marcospb19 force-pushed the fixing-total-calculation-#12 branch from 2197511 to 1c5c592 Compare December 5, 2021 19:56
For the nested files:
 - folder/         (5 MB)
 - folder/big_file (15 MB)

The --total now outputs 15 MB instead of the previous 20 MB, because the
inner file is inside of the folder that was also passed as an argument.

Implemented with the Trie data structure, made of HashMap and PathBufs
that represent each path components of the canonicalized file paths.

Fixes cauebs#12.
@marcospb19 marcospb19 force-pushed the fixing-total-calculation-#12 branch from 1c5c592 to 83ee20e Compare December 6, 2021 00:52
@marcospb19 marcospb19 marked this pull request as ready for review December 6, 2021 00:52
@marcospb19
Copy link
Author

Did the suggestions, and fixed some bugs with the previous Trie implementation.

@marcospb19 marcospb19 closed this Mar 26, 2022
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.

Check if some paths are contained within others, so as not to count them twice towards the total
2 participants