diff --git a/src/nostalgia/tools/pack.cpp b/src/nostalgia/tools/pack.cpp index f792aed0..f035e393 100644 --- a/src/nostalgia/tools/pack.cpp +++ b/src/nostalgia/tools/pack.cpp @@ -15,7 +15,7 @@ using namespace nostalgia; static ox::Error writeFileBuff(ox::CRStringView path, const ox::Buffer &buff) noexcept { try { - std::ofstream f(toStdStringView(path), std::ios::binary); + std::ofstream f(std::string(toStdStringView(path)), std::ios::binary); f.write(buff.data(), static_cast(buff.size())); } catch (const std::fstream::failure&) { return OxError(2, "failed to write file"); @@ -24,7 +24,7 @@ static ox::Error writeFileBuff(ox::CRStringView path, const ox::Buffer &buff) no } static ox::Result readFileBuff(ox::CRStringView path) noexcept { - std::ifstream file(toStdStringView(path), std::ios::binary | std::ios::ate); + std::ifstream file(std::string(toStdStringView(path)), std::ios::binary | std::ios::ate); if (!file.good()) { oxErrorf("Could not find OxFS file: {}", path); return OxError(1, "Could not find OxFS file");