[*] This was bothering me

This commit is contained in:
Reece Wilson 2023-08-15 14:19:23 +01:00
parent 79371fc82f
commit 9cea2fe82a

View File

@ -210,7 +210,7 @@ namespace Aurora::IO::FS
auto uBlockSize = AuMin(AuUInt(kFileCopyBlock), uLength);
if (this->pHandle_->IsAsync())
if (bIsAsync)
{
OVERLAPPED overlapped {};
overlapped.hEvent = hEventHandle;
@ -242,7 +242,6 @@ namespace Aurora::IO::FS
if (!::WriteFile(hHandle, reinterpret_cast<const char *>(parameters.ptr) + uOffset, uBlockSize, &written, NULL))
{
SysPushErrorIO("WriteFile IO Error: 0x{:x}, {}", GetLastError(), this->pHandle_ ? this->pHandle_->GetPath() : "");
AuWin32CloseHandle(hEventHandle);
parameters.outVariable = uOffset;
return false;
}