test: add unit test for ImageIPakPostProcessor

This commit is contained in:
Jan
2025-01-07 23:48:17 +01:00
parent e0f8b3d3ca
commit 8c8ceae0bd
10 changed files with 378 additions and 12 deletions

View File

@ -5,13 +5,13 @@
namespace fs = std::filesystem;
OutputPathFilesystem::OutputPathFilesystem(const fs::path& path)
: m_path(fs::canonical(path))
: m_path(fs::weakly_canonical(path))
{
}
std::unique_ptr<std::ostream> OutputPathFilesystem::Open(const std::string& fileName)
{
const auto fullNewPath = fs::canonical(m_path / fileName);
const auto fullNewPath = fs::weakly_canonical(m_path / fileName);
if (!fullNewPath.string().starts_with(m_path.string()))
return nullptr;