From ede7f2afa6619b7cc975255b1eaa264c73c12a22 Mon Sep 17 00:00:00 2001 From: KWSys Upstream Date: Thu, 24 Oct 2024 16:07:19 -0400 Subject: [PATCH] KWSys 2024-10-24 (e1acde2e) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit e1acde2e48813c276c5777d6adae6bcdc3b03923 (master). Upstream Shortlog ----------------- Brad King (2): 4feb470a SystemTools: Remove GetActualCaseForPath from CollapseFullPath 741c9c96 SystemTools: Expose GetActualCaseForPathCached publicly --- SystemTools.cxx | 10 +++++++++- SystemTools.hxx.in | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/SystemTools.cxx b/SystemTools.cxx index 6cc103df51..cb6d73b7c8 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -3647,7 +3647,6 @@ std::string CollapseFullPathImpl(std::string const& in_path, SystemTools::CheckTranslationPath(newPath); #endif #ifdef _WIN32 - newPath = SystemToolsStatics->GetActualCaseForPathCached(newPath); SystemTools::ConvertToUnixSlashes(newPath); #endif // Return the reconstructed path. @@ -3762,6 +3761,15 @@ std::string SystemTools::GetActualCaseForPath(const std::string& p) #endif } +std::string SystemTools::GetActualCaseForPathCached(const std::string& p) +{ +#ifdef _WIN32 + return SystemToolsStatic::GetActualCaseForPathCached(p); +#else + return p; +#endif +} + const char* SystemTools::SplitPathRootComponent(const std::string& p, std::string* root) { diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 294ffca326..43663c642e 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -372,6 +372,7 @@ public: * This does nothing on non-Windows systems but return the path. */ static std::string GetActualCaseForPath(const std::string& path); + static std::string GetActualCaseForPathCached(const std::string& path); /** * Given the path to a program executable, get the directory part of