Commit de73972
authored
Fix statx created times when unavailable (#268)
* Fix statx created times when unavailable
This previously returned `Some(UNIX_EPOCH)` instead of `None` when `statx` did
not return a created time.
* Loosen fs_additional test assertion for created times
This makes it OK to return file created times even if std doesn't,
which is currently the case for musl builds.
* Check `statx` mask to see if `mtime` and `atime` were returned, too
`std` does these checks, so cap-std should too. `std` only does the checks for
32-bit targets, but they don't seem harmful to enable for all targets.1 parent 21382e5 commit de73972
File tree
2 files changed
+56
-16
lines changed- cap-primitives/src/rustix/fs
- tests
2 files changed
+56
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
231 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
232 | 244 | | |
233 | 245 | | |
234 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
936 | 937 | | |
937 | 938 | | |
938 | 939 | | |
939 | | - | |
940 | | - | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
941 | 948 | | |
942 | 949 | | |
943 | 950 | | |
944 | 951 | | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
952 | 967 | | |
953 | | - | |
| 968 | + | |
954 | 969 | | |
955 | | - | |
956 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
957 | 985 | | |
958 | 986 | | |
959 | 987 | | |
| |||
0 commit comments