From 683af51685ec21d09be4c0ef9ac8228b38bcb56d Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Tue, 1 Sep 2020 14:15:19 +0200 Subject: [PATCH] Replaced boost::filesystem::canonical() with boost::filesystem::absolute(), as canonical() is broken on Windows (reparse points aka symbolic links are not processed correctly). Fixes https://github.com/prusa3d/PrusaSlicer/issues/732 https://github.com/prusa3d/PrusaSlicer/issues/3956 https://github.com/prusa3d/PrusaSlicer/issues/4557 --- src/libslic3r/Preset.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index a5160d2db..7aaa96c8c 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -634,7 +634,9 @@ void PresetCollection::add_default_preset(const std::vector &keys, // Throws an exception on error. void PresetCollection::load_presets(const std::string &dir_path, const std::string &subdir) { - boost::filesystem::path dir = boost::filesystem::canonical(boost::filesystem::path(dir_path) / subdir).make_preferred(); + // Don't use boost::filesystem::canonical() on Windows, it is broken in regard to reparse points, + // see https://github.com/prusa3d/PrusaSlicer/issues/732 + boost::filesystem::path dir = boost::filesystem::absolute(boost::filesystem::path(dir_path) / subdir).make_preferred(); m_dir_path = dir.string(); std::string errors_cummulative; // Store the loaded presets into a new vector, otherwise the binary search for already existing presets would be broken. @@ -1518,7 +1520,9 @@ PhysicalPrinterCollection::PhysicalPrinterCollection( const std::vector