From 6fd31c176842cff3da28734d00ccc53592688ce0 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 24 Aug 2017 18:48:25 +0200 Subject: [PATCH] Fixes filesystem::get_short_path on MSYS2 --- src/filesystem.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/filesystem.cc b/src/filesystem.cc index d04ff96..b792c9c 100644 --- a/src/filesystem.cc +++ b/src/filesystem.cc @@ -101,6 +101,9 @@ boost::filesystem::path filesystem::get_home_path() noexcept { } boost::filesystem::path filesystem::get_short_path(const boost::filesystem::path &path) noexcept { +#ifdef _WIN32 + return path; +#else static auto home_path=get_home_path(); if(!home_path.empty()) { auto relative_path=filesystem::get_relative_path(path, home_path); @@ -108,6 +111,7 @@ boost::filesystem::path filesystem::get_short_path(const boost::filesystem::path return "~"/relative_path; } return path; +#endif } bool filesystem::file_in_path(const boost::filesystem::path &file_path, const boost::filesystem::path &path) {