Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

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: 1 addition & 1 deletion stl/inc/filesystem
Original file line number Diff line number Diff line change
Expand Up @@ -3219,7 +3219,7 @@ namespace filesystem {

_NODISCARD inline __std_win_error _Read_reparse_data(
const _Fs_file& _Handle, unique_ptr<char[]>& _Buffer_unique_ptr) noexcept {
constexpr auto _Buffer_size = 16 * 1024 + sizeof(wchar_t); // MAXIMUM_REPARSE_DATA_BUFFER_SIZE + sizeof(wchar_t)
constexpr auto _Buffer_size = 16 * 1024; // MAXIMUM_REPARSE_DATA_BUFFER_SIZE

_Buffer_unique_ptr.reset(::new (nothrow) char[_Buffer_size]);
if (!_Buffer_unique_ptr) {
Expand Down
5 changes: 3 additions & 2 deletions stl/src/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,10 @@ struct __std_fs_file_id { // typedef struct _FILE_ID_INFO {

[[nodiscard]] __std_win_error __stdcall __std_fs_write_reparse_data_buffer(
_In_ const __std_fs_file_handle _Handle, _In_ const __std_fs_reparse_data_buffer* const _Buffer) noexcept {
constexpr unsigned long _Reparse_data_buffer_header_size = 8; // REPARSE_DATA_BUFFER_HEADER_SIZE
const auto _Buffer_size = _Reparse_data_buffer_header_size + _Buffer->_Reparse_data_length;
if (DeviceIoControl(reinterpret_cast<HANDLE>(_Handle), FSCTL_SET_REPARSE_POINT,
const_cast<__std_fs_reparse_data_buffer*>(_Buffer), sizeof(_Buffer) + _Buffer->_Reparse_data_length,
nullptr, 0, nullptr, nullptr)) {
const_cast<__std_fs_reparse_data_buffer*>(_Buffer), _Buffer_size, nullptr, 0, nullptr, nullptr)) {
return __std_win_error::_Success;
}

Expand Down