ReVPK: check if retrieving directory file stem was successful

Error out if it wasn't.
This commit is contained in:
Kawe Mazidjatari 2025-02-09 02:30:35 +01:00
parent 08646370c4
commit 85d99364cb

View File

@ -233,7 +233,12 @@ static void ReVPK_Unpack(const CCommand& args)
} }
CUtlString baseName; CUtlString baseName;
PackedStore_GetDirBaseName(vpk.m_DirFilePath, baseName);
if (!PackedStore_GetDirBaseName(vpk.m_DirFilePath, baseName))
{
Error(eDLL_T::FS, NO_ERROR, "Failed to retrieve directory file stem from \"%s\"!\n", vpk.m_DirFilePath.String());
return;
}
// Write the unpack log to a file. // Write the unpack log to a file.
CFmtStr1024 textFileName("%s%s%s.log", outPath, UNPACK_LOG_DIR, baseName.String()); CFmtStr1024 textFileName("%s%s%s.log", outPath, UNPACK_LOG_DIR, baseName.String());