From eed83f8815ec12203299ef8ef40e2152c35b3c07 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 4 Jul 2023 21:39:31 +0200 Subject: [PATCH] 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. --- r5dev/vpklib/packedstore.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r5dev/vpklib/packedstore.cpp b/r5dev/vpklib/packedstore.cpp index 64a2d21e..5f4f45d7 100644 --- a/r5dev/vpklib/packedstore.cpp +++ b/r5dev/vpklib/packedstore.cpp @@ -98,7 +98,9 @@ void CPackedStore::GetEntryBlocks(CUtlVector& entryBlocks, File { while (!(fileName = FileSystem()->ReadString(hDirectoryFile)).IsEmpty()) { + filePath.AppendSlash(); const CUtlString svFilePath = FormatEntryPath(filePath, fileName, fileExtension); + entryBlocks.AddToTail(VPKEntryBlock_t(hDirectoryFile, svFilePath.Get())); } }