[*] pt1/2 bug: dir logger whining

This commit is contained in:
Reece Wilson 2023-12-30 19:30:17 +00:00
parent 4e0c68d7ad
commit ab68f07bb9

View File

@ -42,6 +42,13 @@ namespace Aurora::IO::FS
return {};
}
auto qwLength = pFileSrc->GetLength();
if (!qwLength)
{
pFileSrc->Close();
return AuFS::Relink(path, path + suffix);
}
auto pFileDest = OpenWriteShared(path + suffix, EFileAdvisoryLockLevel::eBlockReadWrite);
if (!pFileDest)
{
@ -55,7 +62,6 @@ namespace Aurora::IO::FS
return {};
}
auto qwLength = pFileSrc->GetLength();
auto pFileStream = AuMakeShared<AuIO::FS::FileReader>(pFileSrc);
SysCheckNotNullMemory(pFileStream, {});
@ -166,6 +172,13 @@ namespace Aurora::IO::FS
return {};
}
auto qwLength = pFileSrc->GetLength();
if (!qwLength)
{
pFileSrc->Close();
return AuFS::Relink(path + suffix, path);
}
auto pFileDest = OpenWriteShared(path, EFileAdvisoryLockLevel::eBlockReadWrite);
if (!pFileDest)
{
@ -179,8 +192,6 @@ namespace Aurora::IO::FS
return {};
}
auto qwLength = pFileSrc->GetLength();
auto pFileStream = AuMakeShared<AuIO::FS::FileReader>(pFileSrc);
if (!pFileStream)
{