mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-13 10:29:16 +00:00
![]() Fix `FileType` `PartialEq` implementation on Windows Fixes #138668 On Windows the [`FileType`](https://doc.rust-lang.org/stable/std/fs/struct.FileType.html) struct was deriving `PartialEq` which in turn means it was doing a bit-for-bit comparison on the file attributes and reparse point. This is wrong because `attributes` may contain many things unrelated to file type. `FileType` on Windows allows for four possible combinations (see also [`FileTypeExt`](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html)): `file`, `dir`, `symlink_file` and `symlink_dir`. So the new implementation makes sure both symlink and directory information match (and only those things). This could be considered just a bug fix but it is a behaviour change so someone from libs-api might want to FCP this (or might not)... |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |