From de30a362b0c2cb198e9c3675deea77c0b6651d9f Mon Sep 17 00:00:00 2001 From: Jean-Philip Desjardins Date: Mon, 29 Jan 2024 17:23:01 -0500 Subject: [PATCH] Resolve single dots in MakeAbsolute. --- Source/iop/Iop_McServ.cpp | 4 ++++ tools/McServTest/tests/LOTR_ROTK.xml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Source/iop/Iop_McServ.cpp b/Source/iop/Iop_McServ.cpp index 8fc147e4e2..fa42b41723 100644 --- a/Source/iop/Iop_McServ.cpp +++ b/Source/iop/Iop_McServ.cpp @@ -134,6 +134,10 @@ std::string CMcServ::MakeAbsolutePath(const std::string& inputPath) for(const auto& frag : frags) { if(frag.empty()) continue; + if(frag == ".") + { + continue; + } if(frag == "..") { if(newFrags.empty()) diff --git a/tools/McServTest/tests/LOTR_ROTK.xml b/tools/McServTest/tests/LOTR_ROTK.xml index 37932c926a..e9f617967c 100644 --- a/tools/McServTest/tests/LOTR_ROTK.xml +++ b/tools/McServTest/tests/LOTR_ROTK.xml @@ -19,6 +19,9 @@ + + +