mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-27 23:27:52 -05:00
test: add unit test for ImageIPakPostProcessor
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user