Closed ehuss closed 6 years ago
Nice fix! I think I buy it. @retep998 Was this sort of breakage intentional? Or was the way we were using FILE_NAME_INFO
previously just flat out wrong?
Also, does this fix work with winapi >=0.3.0, <0.3.5
?
That sort of breakage was not intentional, but it's also the sort of breakage that should not affect anyone because people should not be assuming that the offset of the unsized field is the same as the struct's size. The new code in this PR is definitely much better. Yes, it works with all winapi versions.
Also, does this fix work with winapi >=0.3.0, <0.3.5?
I tested with winapi 0.3.0 on a variety of windows shells, and they all seem to behave correctly.
Thank you folks!
@retep998 @BurntSushi I tagged and published a new crate version 0.2.11
@softprops Awesome, thank you!
Ever since winapi version 0.3.5, tty detection for msys terminals has been broken. The definition for FILE_NAME_INFO struct changed in retep998/winapi-rs#607, causing the first character from the filename to be cut off.