Another windows build fix
This commit is contained in:
@@ -70,9 +70,9 @@ namespace OpenVulkano
|
|||||||
{
|
{
|
||||||
PrepOpen();
|
PrepOpen();
|
||||||
if constexpr (std::is_same_v<std::filesystem::path::value_type, char>)
|
if constexpr (std::is_same_v<std::filesystem::path::value_type, char>)
|
||||||
ChkErr(archive_read_open_filename(m_archive, archiveFile.c_str(), BUFFER_SIZE));
|
ChkErr(archive_read_open_filename(m_archive, (const char*)archiveFile.c_str(), BUFFER_SIZE));
|
||||||
else
|
else
|
||||||
ChkErr(archive_read_open_filename_w(m_archive, (wchar_t*)archiveFile.c_str(), BUFFER_SIZE));
|
ChkErr(archive_read_open_filename_w(m_archive, (const wchar_t*)archiveFile.c_str(), BUFFER_SIZE));
|
||||||
ReadNextHeader();
|
ReadNextHeader();
|
||||||
return HasNext();
|
return HasNext();
|
||||||
}
|
}
|
||||||
@@ -82,10 +82,7 @@ namespace OpenVulkano
|
|||||||
{
|
{
|
||||||
if (archiveFile[0] == '\0')
|
if (archiveFile[0] == '\0')
|
||||||
{
|
{
|
||||||
if (m_logger)
|
if (m_logger) m_logger->error("Unable to open archive file with an empty name!");
|
||||||
{
|
|
||||||
m_logger->error("Unable to open archive file with an empty name!");
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
PrepOpen();
|
PrepOpen();
|
||||||
@@ -110,14 +107,14 @@ namespace OpenVulkano
|
|||||||
bool ArchiveReader::Open(const std::vector<std::string>& archiveFiles)
|
bool ArchiveReader::Open(const std::vector<std::string>& archiveFiles)
|
||||||
{
|
{
|
||||||
if (archiveFiles.empty()) return false;
|
if (archiveFiles.empty()) return false;
|
||||||
ArchiveConfiguration ac = ArchiveConfiguration::FromFileName(archiveFiles.front().c_str());
|
const ArchiveConfiguration ac = ArchiveConfiguration::FromFileName(archiveFiles.front().c_str());
|
||||||
if (ac.type == ArchiveType::TAR) // TODO handle all archive types correctly
|
if (ac.type == ArchiveType::TAR) // TODO handle all archive types correctly
|
||||||
{ // Queue based approach for all archive types that do not natively support split archives
|
{ // Queue based approach for all archive types that do not natively support split archives
|
||||||
for(const std::string& file : archiveFiles)
|
for(const std::string& file : archiveFiles)
|
||||||
{
|
{
|
||||||
m_archivesToRead.push(file);
|
m_archivesToRead.push(file);
|
||||||
}
|
}
|
||||||
bool state = Open(m_archivesToRead.front());
|
const bool state = Open(m_archivesToRead.front());
|
||||||
m_archivesToRead.pop();
|
m_archivesToRead.pop();
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user