This commit is contained in:
enricoturri1966 2020-09-01 14:35:51 +02:00
commit acb5a9bc8d

View File

@ -634,7 +634,9 @@ void PresetCollection::add_default_preset(const std::vector<std::string> &keys,
// Throws an exception on error. // Throws an exception on error.
void PresetCollection::load_presets(const std::string &dir_path, const std::string &subdir) 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(); m_dir_path = dir.string();
std::string errors_cummulative; std::string errors_cummulative;
// Store the loaded presets into a new vector, otherwise the binary search for already existing presets would be broken. // 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<std::str
// Throws an exception on error. // Throws an exception on error.
void PhysicalPrinterCollection::load_printers(const std::string& dir_path, const std::string& subdir) void PhysicalPrinterCollection::load_printers(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(); m_dir_path = dir.string();
std::string errors_cummulative; std::string errors_cummulative;
// Store the loaded printers into a new vector, otherwise the binary search for already existing presets would be broken. // Store the loaded printers into a new vector, otherwise the binary search for already existing presets would be broken.