1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-20 15:40:32 +00:00

bsatool: Support extracting files with forward slash paths

This commit is contained in:
Alexei Kotov 2023-11-27 00:58:05 +03:00
parent 3be0ee824a
commit 3bf5b150c5

View File

@ -194,7 +194,8 @@ int extract(std::unique_ptr<File>& bsa, Arguments& info)
// Get a stream for the file to extract
for (auto it = bsa->getList().rbegin(); it != bsa->getList().rend(); ++it)
{
if (Misc::StringUtils::ciEqual(Misc::StringUtils::stringToU8String(it->name()), archivePath))
auto streamPath = Misc::StringUtils::stringToU8String(it->name());
if (Misc::StringUtils::ciEqual(streamPath, archivePath) || Misc::StringUtils::ciEqual(streamPath, extractPath))
{
stream = bsa->getFile(&*it);
break;