fix(wasi): touch timestamp handling - #13686
Conversation
|
GNU testsuite comparison: |
Merging this PR will improve performance by 3.03%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
|
This is a lot of cfg. Would it be possible to refactor this a bit? Thanks |
b9e71c0 to
e767e43
Compare
|
I tried simplifying a bit. I believe that the readability would really improve if we moved the wasi (or redox) cfg path to a separate file. The downside is that it will have duplicated code. |
|
Please fix the lint |
touch avoids the filetime crate's panicking WASI fallback by reading timestamps via Metadata::accessed/modified, and uses rustix::fs::utimensat for symlink timestamps since filetime::set_symlink_file_times always fails on WASI.
e767e43 to
0ef5ed9
Compare
touch avoids the filetime crate's panicking WASI fallback by reading timestamps via Metadata::accessed/modified, and uses rustix::fs::utimensat for symlink timestamps since filetime::set_symlink_file_times always fails on WASI.