From e65e4049fa06c5879e55dfbc48808e0c2ee5d540 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 23 Sep 2019 07:39:53 -0700 Subject: [PATCH] Fixed GetActualPath where path begins with a slash --- BeefySysLib/platform/win/Platform.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BeefySysLib/platform/win/Platform.cpp b/BeefySysLib/platform/win/Platform.cpp index e6d647e1..65a7aee2 100644 --- a/BeefySysLib/platform/win/Platform.cpp +++ b/BeefySysLib/platform/win/Platform.cpp @@ -3161,6 +3161,13 @@ BFP_EXPORT void BFP_CALLTYPE BfpFile_GetActualPath(const char* inPathC, char* ou } } + if ((i == 0) && (length >= 1) && + ((inPath[0] == DIR_SEP_CHAR) || (inPath[1] == DIR_SEP_CHAR_ALT))) + { + i++; // start after initial slash + outPath.Append(DIR_SEP_CHAR); + } + int32 lastComponentStart = i; bool addSeparator = false; String subName;