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

Handle equal file size checks properly #3

Merged

Conversation

zihadmahiuddin
Copy link
Contributor

The previous code wasn't working for file sizes like 1000, 1000000, etc. because it was only doing less than and greater than checks, no equal checks.

Also, for a file with size 1000001, it would show 1000001MB which is not right, it was missing the needed divisions to turn bytes into megabytes and so on which I have added now.

I also added some tests for the Path::size_string_formatter function.

Closes #1

@schneiderchristopher
Copy link
Owner

Thanks! I did forget to actually divide the bytes 😅. Thanks for also introducing testing, once I fix the conflicts with the previous PR I will merge this.

@schneiderchristopher schneiderchristopher merged commit 3aad795 into schneiderchristopher:master Jan 30, 2023
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.

Wrong size conversion when size is 1000.
2 participants