Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions core/libs/prx/libc/src/General.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ bool CaseInsensitiveDirectoryWindows(const std::filesystem::path& directory) {
const std::unique_ptr<void, decltype(&CloseHandle)> owner(handle, &CloseHandle);
struct { ULONG flags; } information{};
constexpr auto caseSensitiveInfo = static_cast<FILE_INFO_BY_HANDLE_CLASS>(23);
return GetFileInformationByHandleEx(handle, caseSensitiveInfo, &information, sizeof(information)) &&
(information.flags & FILE_CS_FLAG_CASE_SENSITIVE_DIR) == 0;
if (GetFileInformationByHandleEx(handle, caseSensitiveInfo, &information, sizeof(information)))
return (information.flags & FILE_CS_FLAG_CASE_SENSITIVE_DIR) == 0;
const auto error = GetLastError();
return error == ERROR_CALL_NOT_IMPLEMENTED || error == ERROR_INVALID_PARAMETER || error == ERROR_NOT_SUPPORTED ||
error == ERROR_INVALID_FUNCTION;
}

std::error_code MatchNamesWindows(const std::filesystem::path& directory, std::span<NameMatch> names) {
Expand Down
Loading