From: Joel Rosdahl Date: Thu, 7 Nov 2024 20:54:32 +0000 (+0100) Subject: chore: Store config paths in lexically normal form X-Git-Tag: v4.11~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93694c6921d15b71e9fd3c6298aea83a05972b10;p=thirdparty%2Fccache.git chore: Store config paths in lexically normal form --- diff --git a/src/ccache/config.cpp b/src/ccache/config.cpp index d6b6bad5..8f596ea0 100644 --- a/src/ccache/config.cpp +++ b/src/ccache/config.cpp @@ -708,13 +708,13 @@ Config::system_config_path() const void Config::set_config_path(const fs::path& path) { - m_config_path = path; + m_config_path = util::lexically_normal(path); } void Config::set_system_config_path(const fs::path& path) { - m_system_config_path = path; + m_system_config_path = util::lexically_normal(path); } bool diff --git a/src/ccache/config.hpp b/src/ccache/config.hpp index a527533b..2e15b4c0 100644 --- a/src/ccache/config.hpp +++ b/src/ccache/config.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -533,13 +534,13 @@ Config::size_unit_prefix_type() const inline void Config::set_base_dir(const std::filesystem::path& value) { - m_base_dir = value; + m_base_dir = util::lexically_normal(value); } inline void Config::set_cache_dir(const std::filesystem::path& value) { - m_cache_dir = value; + m_cache_dir = util::lexically_normal(value); if (!m_temporary_dir_configured_explicitly) { m_temporary_dir = default_temporary_dir(); } @@ -626,5 +627,5 @@ Config::set_run_second_cpp(bool value) inline void Config::set_temporary_dir(const std::filesystem::path& value) { - m_temporary_dir = value; + m_temporary_dir = util::lexically_normal(value); }