Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix filesystem::directory_entry::refresh on Win11 24H2 #5077

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions stl/inc/xfilesystem_abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ enum class __std_win_error : unsigned long {
_Sharing_violation = 32, // #define ERROR_SHARING_VIOLATION 32L
_Not_supported = 50, // #define ERROR_NOT_SUPPORTED 50L
_Error_bad_netpath = 53, // #define ERROR_BAD_NETPATH 53L
_Error_netname_deleted = 64, // #define ERROR_NETNAME_DELETED 64L
_File_exists = 80, // #define ERROR_FILE_EXISTS 80L
_Invalid_parameter = 87, // #define ERROR_INVALID_PARAMETER 87L
_Insufficient_buffer = 122, // #define ERROR_INSUFFICIENT_BUFFER 122L
Expand All @@ -54,6 +55,7 @@ _NODISCARD inline bool __std_is_file_not_found(const __std_win_error _Error) noe
case __std_win_error::_Error_bad_netpath:
case __std_win_error::_Invalid_name:
case __std_win_error::_Directory_name_is_invalid: // Windows 11 24H2
case __std_win_error::_Error_netname_deleted: // Windows 11 24H2
return true;
default:
return false;
Expand Down
10 changes: 7 additions & 3 deletions tests/std/tests/P0218R1_filesystem/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4082,11 +4082,15 @@ int wmain(int argc, wchar_t* argv[]) {
try {
return run_all_tests(argc, argv);
} catch (const filesystem_error& fe) {
cout << "filesystem_error: " << fe.what() << endl;
cout << "Caught filesystem_error." << endl;
cout << " what: " << fe.what() << endl;
cout << " value: " << fe.code().value() << endl;
cout << "category: " << fe.code().category().name() << endl;
} catch (const exception& e) {
cout << "exception: " << e.what() << endl;
cout << "Caught exception." << endl;
cout << "what: " << e.what() << endl;
} catch (...) {
cout << "Unknown exception." << endl;
cout << "Caught unknown exception." << endl;
}

return EXIT_FAILURE;
Expand Down