FindFirstFile considers a path with a trailing backslash as invalid:
This parameter should not be NULL, an invalid string (for example, an empty string or a string that is missing the terminating null character), or end in a trailing backslash ().
It seems the trailing backslash used to be fine on older versions of Wine, but it has since been fixed.
This could be resolved by trimming the backslash, but I think it's better to use PathFileExists instead, which "Determines whether a path to a file system object such as a file or folder is valid.".
I have not tested the changes on Windows, however (but if the Microsoft Documentation is to be believed then it shouldn't have worked before).
FindFirstFile considers a path with a trailing backslash as invalid:
It seems the trailing backslash used to be fine on older versions of Wine, but it has since been fixed.
This could be resolved by trimming the backslash, but I think it's better to use PathFileExists instead, which "Determines whether a path to a file system object such as a file or folder is valid.".
I have not tested the changes on Windows, however (but if the Microsoft Documentation is to be believed then it shouldn't have worked before).