Allow uncompressed files in zip archives
This commit is contained in:
@@ -41,6 +41,7 @@ namespace OpenVulkano
|
||||
#else
|
||||
m_writer = std::make_unique<ArchiveWriter>(m_archives.back().c_str(), m_archiveConfig, m_logger);
|
||||
#endif
|
||||
if (m_shouldCompress) m_writer->SetShouldCompressFunction(m_shouldCompress);
|
||||
}
|
||||
|
||||
void MultiPartArchiveWriter::CheckSize(size_t size)
|
||||
@@ -114,4 +115,10 @@ namespace OpenVulkano
|
||||
if (!m_writer || !m_writer->GetTotalWrittenBytes()) return; // Nothing has been written yet, no need to split file
|
||||
m_writer = nullptr;
|
||||
}
|
||||
|
||||
void MultiPartArchiveWriter::SetShouldCompressFunction(const std::function<bool(const FileDescription&)>& shouldComp)
|
||||
{
|
||||
if (m_writer) m_writer->SetShouldCompressFunction(shouldComp);
|
||||
m_shouldCompress = shouldComp;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user