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

Fix panics when query file metadata, if timestamps predate the epoch #332

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Sep 18, 2023

It's possible for a file to have a timestamp that predates the Epoch. But Rust's std::time::Duration object cannot be negative. So cap-primitives must carefully handle any negative timestamps it gets.

Fixes #328

It's possible for a file to have a timestamp that predates the Epoch.
But Rust's std::time::Duration object cannot be negative.  So
cap-primitives must carefully handle any negative timestamps it gets.

Fixes bytecodealliance#328
@sunfishcode
Copy link
Member

I didn't know timestamps before the epoch were valid. Thanks for the fix!

@sunfishcode sunfishcode merged commit 7cd2b94 into bytecodealliance:main Sep 24, 2023
22 checks passed
@asomers asomers deleted the negative-time branch January 8, 2024 21:09
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.

Panics on files with negative timestamps
2 participants