mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-07-03 09:41:50 +00:00
fix: make file name verification consider max file name length in zone properly
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
#include "InvalidFileNameException.h"
|
||||
|
||||
InvalidFileNameException::InvalidFileNameException(std::string& actualFileName, std::string& expectedFileName)
|
||||
#include <format>
|
||||
|
||||
InvalidFileNameException::InvalidFileNameException(const std::string& actualFileName, const std::string& expectedFileName)
|
||||
{
|
||||
m_actual_file_name = actualFileName;
|
||||
m_expected_file_name = expectedFileName;
|
||||
@ -8,7 +10,7 @@ InvalidFileNameException::InvalidFileNameException(std::string& actualFileName,
|
||||
|
||||
std::string InvalidFileNameException::DetailedMessage()
|
||||
{
|
||||
return "Name verification failed: The fastfile was created as '" + m_expected_file_name + "' but loaded as '" + m_actual_file_name + "'";
|
||||
return std::format("Name verification failed: The fastfile was created as '{}' but loaded as '{}'", m_expected_file_name, m_actual_file_name);
|
||||
}
|
||||
|
||||
char const* InvalidFileNameException::what() const noexcept
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
class InvalidFileNameException final : public LoadingException
|
||||
{
|
||||
std::string m_actual_file_name;
|
||||
std::string m_expected_file_name;
|
||||
|
||||
public:
|
||||
InvalidFileNameException(std::string& actualFileName, std::string& expectedFileName);
|
||||
InvalidFileNameException(const std::string& actualFileName, const std::string& expectedFileName);
|
||||
|
||||
std::string DetailedMessage() override;
|
||||
char const* what() const noexcept override;
|
||||
|
||||
std::string m_actual_file_name;
|
||||
std::string m_expected_file_name;
|
||||
};
|
||||
|
Reference in New Issue
Block a user