Fixed handling of relative paths on MSVC

This commit is contained in:
Bartek Kryza
2023-12-09 19:52:49 +01:00
parent a1f7769ba5
commit 6055c5684e
4 changed files with 12 additions and 11 deletions

View File

@@ -255,7 +255,7 @@ std::vector<std::string> diagram::get_translation_units() const
std::filesystem::path diagram::root_directory() const
{
return canonical(absolute(base_directory() / relative_to()));
return weakly_canonical(absolute(base_directory() / relative_to()));
}
std::filesystem::path diagram::make_path_relative(

View File

@@ -2311,13 +2311,10 @@ std::string translation_unit_visitor::make_lambda_name(
const auto location = cls->getLocation();
const auto file_line = source_manager().getSpellingLineNumber(location);
const auto file_column = source_manager().getSpellingColumnNumber(location);
const std::string file_name = config().make_path_relative(
source_manager().getFilename(location).str());
//
// util::path_to_url(std::filesystem::relative(
// source_manager().getFilename(location).str(),
// config().relative_to())
// .string());
const std::string file_name =
config()
.make_path_relative(source_manager().getFilename(location).str())
.string();
if (context().caller_id() != 0 &&
get_participant(context().caller_id()).has_value()) {