Path is not escaped twice in the debug mode (#3321)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov
2023-03-05 21:01:06 +05:00
committed by GitHub
parent 3daf33837c
commit 050293646f
2 changed files with 22 additions and 0 deletions

View File

@@ -77,6 +77,11 @@ inline void write_escaped_path<std::filesystem::path::value_type>(
template <typename Char>
struct formatter<std::filesystem::path, Char>
: formatter<basic_string_view<Char>> {
template <typename ParseContext> FMT_CONSTEXPR auto parse(ParseContext& ctx) {
auto out = formatter<basic_string_view<Char>>::parse(ctx);
this->set_debug_format(false);
return out;
}
template <typename FormatContext>
auto format(const std::filesystem::path& p, FormatContext& ctx) const ->
typename FormatContext::iterator {