Simplified empty string comparison, added logger reporting error
This commit is contained in:
@@ -57,8 +57,14 @@ namespace OpenVulkano
|
||||
|
||||
bool ArchiveReader::Open(const char* archiveFile)
|
||||
{
|
||||
if (std::string(archiveFile) == "")
|
||||
if (archiveFile[0] == '\0')
|
||||
{
|
||||
if (m_logger)
|
||||
{
|
||||
m_logger->error("Unable to open archive file with an empty name!");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
PrepOpen();
|
||||
ChkErr(archive_read_open_filename(m_archive, archiveFile, BUFFER_SIZE));
|
||||
ReadNextHeader();
|
||||
|
||||
Reference in New Issue
Block a user