In r315079, fs::rename was reimplemented in terms of CreateFile and SetFileInformationByHandle. Unfortunately, the latter isn't supported by Wine. This adds a fallback to MoveFileEx for that case.
Details
Diff Detail
Event Timeline
lib/Support/Windows/Path.inc | ||
---|---|---|
436 | Wine returns ERROR_CALL_NOT_IMPLEMENTED if it does not support the call to SetFileInformationByHandle. Would it be simpler to detect that here and try the MoveFileEx if it fails in that way? |
lib/Support/Windows/Path.inc | ||
---|---|---|
436 | Yes, that seems much nicer. Thanks! |
LGTM
lib/Support/Windows/Path.inc | ||
---|---|---|
437 | Perhaps more precise to compare EC against std::error_code(ERROR_CALL_NOT_IMPLEMENTED, std::system_category()) here. |
lib/Support/Windows/Path.inc | ||
---|---|---|
437 | Will do. Hmm actually, this means Wine will print to stderr complaining about the unimplementedness of the function. But maybe that's ok.. |
Wine returns ERROR_CALL_NOT_IMPLEMENTED if it does not support the call to SetFileInformationByHandle. Would it be simpler to detect that here and try the MoveFileEx if it fails in that way?