mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
fix: compilation on windows
This commit is contained in:
parent
dfd6e4117c
commit
9097db7d0f
@ -30,7 +30,7 @@ void IwdToCreate::Build(ISearchPath& searchPath, const std::filesystem::path& ou
|
|||||||
|
|
||||||
auto functions = FileToZlibWrapper::CreateFunctions32ForFile(&file);
|
auto functions = FileToZlibWrapper::CreateFunctions32ForFile(&file);
|
||||||
|
|
||||||
auto zipFile = zipOpen2(filePath.c_str(), APPEND_STATUS_CREATE, nullptr, &functions);
|
auto zipFile = zipOpen2(filePath.string().c_str(), APPEND_STATUS_CREATE, nullptr, &functions);
|
||||||
if (!zipFile)
|
if (!zipFile)
|
||||||
{
|
{
|
||||||
std::cerr << std::format("Failed to open file as zip for iwd {}\n", m_name);
|
std::cerr << std::format("Failed to open file as zip for iwd {}\n", m_name);
|
||||||
@ -68,7 +68,7 @@ void IwdToCreate::Build(ISearchPath& searchPath, const std::filesystem::path& ou
|
|||||||
readFile.m_stream->read(tempBuffer, sizeof(tempBuffer));
|
readFile.m_stream->read(tempBuffer, sizeof(tempBuffer));
|
||||||
const auto readCount = readFile.m_stream->gcount();
|
const auto readCount = readFile.m_stream->gcount();
|
||||||
if (readCount > 0)
|
if (readCount > 0)
|
||||||
zipWriteInFileInZip(zipFile, tempBuffer, readCount);
|
zipWriteInFileInZip(zipFile, tempBuffer, static_cast<unsigned>(readCount));
|
||||||
} while (!readFile.m_stream->eof());
|
} while (!readFile.m_stream->eof());
|
||||||
|
|
||||||
zipCloseFileInZip(zipFile);
|
zipCloseFileInZip(zipFile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user