diff --git a/r5dev/public/utility.cpp b/r5dev/public/utility.cpp index cd917497..41875119 100644 --- a/r5dev/public/utility.cpp +++ b/r5dev/public/utility.cpp @@ -314,10 +314,12 @@ string CreateDirectories(string svInput, bool bWindows) if (bWindows) { StringReplace(svInput, "\\ \\", "\\"); + StringReplace(svInput, " \\", ""); } else { StringReplace(svInput, "/ /", "/"); + StringReplace(svInput, " /", ""); } fs::path fspPathOut(svInput); diff --git a/r5dev/vpklib/packedstore.cpp b/r5dev/vpklib/packedstore.cpp index 4b840e90..1d7c950e 100644 --- a/r5dev/vpklib/packedstore.cpp +++ b/r5dev/vpklib/packedstore.cpp @@ -523,7 +523,7 @@ void CPackedStore::UnpackAll(const VPKDir_t& vpkDir, const string& svPathOut) } else // Chunk belongs to this block. { - string svFilePath = CreateDirectories(svPathOut + vpkDir.m_vvEntryBlocks[j].m_svBlockPath, true); + string svFilePath = CreateDirectories(svPathOut + vpkDir.m_vvEntryBlocks[j].m_svBlockPath); CIOStream oStream(svFilePath, CIOStream::Mode_t::WRITE); if (!oStream.IsWritable())