Always make sure a slash gets appended to the filepath

On the game's filesystem, the slash always appeared, when running this code on a reimplemented filesystem, no slash was found at the end of the path. This change ensures there is always a slash.
This commit is contained in:
Kawe Mazidjatari 2023-07-04 21:39:31 +02:00
parent c330273508
commit eed83f8815

View File

@ -98,7 +98,9 @@ void CPackedStore::GetEntryBlocks(CUtlVector<VPKEntryBlock_t>& entryBlocks, File
{ {
while (!(fileName = FileSystem()->ReadString(hDirectoryFile)).IsEmpty()) while (!(fileName = FileSystem()->ReadString(hDirectoryFile)).IsEmpty())
{ {
filePath.AppendSlash();
const CUtlString svFilePath = FormatEntryPath(filePath, fileName, fileExtension); const CUtlString svFilePath = FormatEntryPath(filePath, fileName, fileExtension);
entryBlocks.AddToTail(VPKEntryBlock_t(hDirectoryFile, svFilePath.Get())); entryBlocks.AddToTail(VPKEntryBlock_t(hDirectoryFile, svFilePath.Get()));
} }
} }