mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 18:28:31 +00:00
[SHELLBTRFS] Addendum to 1725ddf
This commit is contained in:
parent
5f779048d3
commit
45a643a136
1 changed files with 20 additions and 0 deletions
|
@ -833,15 +833,25 @@ void BtrfsContextMenu::reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir
|
||||||
streambufsize += 0x1000;
|
streambufsize += 0x1000;
|
||||||
streambuf.resize(streambufsize);
|
streambuf.resize(streambufsize);
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
memset(streambuf.data(), 0, streambufsize);
|
memset(streambuf.data(), 0, streambufsize);
|
||||||
|
|
||||||
Status = NtQueryInformationFile(source, &iosb, streambuf.data(), streambufsize, FileStreamInformation);
|
Status = NtQueryInformationFile(source, &iosb, streambuf.data(), streambufsize, FileStreamInformation);
|
||||||
|
#else
|
||||||
|
memset(&streambuf[0], 0, streambufsize);
|
||||||
|
|
||||||
|
Status = NtQueryInformationFile(source, &iosb, &streambuf[0], streambufsize, FileStreamInformation);
|
||||||
|
#endif
|
||||||
} while (Status == STATUS_BUFFER_OVERFLOW);
|
} while (Status == STATUS_BUFFER_OVERFLOW);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
throw ntstatus_error(Status);
|
throw ntstatus_error(Status);
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
auto fsi = reinterpret_cast<FILE_STREAM_INFORMATION*>(streambuf.data());
|
auto fsi = reinterpret_cast<FILE_STREAM_INFORMATION*>(streambuf.data());
|
||||||
|
#else
|
||||||
|
auto fsi = reinterpret_cast<FILE_STREAM_INFORMATION*>(&streambuf[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (fsi->StreamNameLength > 0) {
|
if (fsi->StreamNameLength > 0) {
|
||||||
|
@ -1525,15 +1535,25 @@ static void reflink_copy2(const wstring& srcfn, const wstring& destdir, const ws
|
||||||
streambufsize += 0x1000;
|
streambufsize += 0x1000;
|
||||||
streambuf.resize(streambufsize);
|
streambuf.resize(streambufsize);
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
memset(streambuf.data(), 0, streambufsize);
|
memset(streambuf.data(), 0, streambufsize);
|
||||||
|
|
||||||
Status = NtQueryInformationFile(source, &iosb, streambuf.data(), streambufsize, FileStreamInformation);
|
Status = NtQueryInformationFile(source, &iosb, streambuf.data(), streambufsize, FileStreamInformation);
|
||||||
|
#else
|
||||||
|
memset(&streambuf[0], 0, streambufsize);
|
||||||
|
|
||||||
|
Status = NtQueryInformationFile(source, &iosb, &streambuf[0], streambufsize, FileStreamInformation);
|
||||||
|
#endif
|
||||||
} while (Status == STATUS_BUFFER_OVERFLOW);
|
} while (Status == STATUS_BUFFER_OVERFLOW);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
throw ntstatus_error(Status);
|
throw ntstatus_error(Status);
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
auto fsi = reinterpret_cast<FILE_STREAM_INFORMATION*>(streambuf.data());
|
auto fsi = reinterpret_cast<FILE_STREAM_INFORMATION*>(streambuf.data());
|
||||||
|
#else
|
||||||
|
auto fsi = reinterpret_cast<FILE_STREAM_INFORMATION*>(&streambuf[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (fsi->StreamNameLength > 0) {
|
if (fsi->StreamNameLength > 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue