Log the path too

This commit is contained in:
offtkp 2024-10-02 03:59:34 +03:00
parent b58b9a251f
commit 0f91f06d87

View file

@ -104,12 +104,13 @@ bool TRP::Extract(const std::filesystem::path& trophyPath) {
size_t pos = xml_name.find("ESFM");
if (pos != std::string::npos)
xml_name.replace(pos, xml_name.length(), "XML");
size_t written =
Common::FS::IOFile::WriteBytes(trpFilesPath / "Xml" / xml_name, XML);
std::filesystem::path path = trpFilesPath / "Xml" / xml_name;
size_t written = Common::FS::IOFile::WriteBytes(path, XML);
if (written != XML.size()) {
LOG_CRITICAL(Common_Filesystem,
"Trophy XML write failed, wanted to write {} bytes, wrote {}",
XML.size(), written);
LOG_CRITICAL(
Common_Filesystem,
"Trophy XML {} write failed, wanted to write {} bytes, wrote {}",
fmt::UTF(path.u8string()), XML.size(), written);
}
}
}