Skip to content

Fix hashfile function to return consistent file hashes in MacOS#341

Merged
miketout merged 2 commits intomiketout:devfrom
Asherda:hashfile-consistency-fix
Feb 19, 2025
Merged

Fix hashfile function to return consistent file hashes in MacOS#341
miketout merged 2 commits intomiketout:devfrom
Asherda:hashfile-consistency-fix

Conversation

@Asherda
Copy link
Copy Markdown

@Asherda Asherda commented Feb 19, 2025

The std::ifstream::readsome function is not guaranteed to read all the requested bytes into the buffer on certain files or systems because it reads only what is readily available. This behavior can lead to inconsistencies, such as a calculated hash of a file being different on macOS compared to other systems.

@miketout miketout merged commit d1f2365 into miketout:dev Feb 19, 2025
@Asherda Asherda deleted the hashfile-consistency-fix branch October 22, 2025 20:33
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.

2 participants