Skip to content

Commit

Permalink
Fix of Invoking prusa-slicer from $PATH environment variable crashes #…
Browse files Browse the repository at this point in the history
…5542

Also it likely fixes Crashes when started from symbolic link #5751
  • Loading branch information
bubnikv committed Jan 13, 2021
1 parent 0369caa commit 293f85b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PrusaSlicer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <boost/nowide/cenv.hpp>
#include <boost/nowide/iostream.hpp>
#include <boost/nowide/integration/filesystem.hpp>
#include <boost/dll/runtime_symbol_info.hpp>

#include "unix/fhs.hpp" // Generated by CMake from ../platform/unix/fhs.hpp.in

Expand Down Expand Up @@ -594,7 +595,9 @@ bool CLI::setup(int argc, char **argv)
}
}

boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]);
// See Invoking prusa-slicer from $PATH environment variable crashes #5542
// boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]);
boost::filesystem::path path_to_binary = boost::dll::program_location();

// Path from the Slic3r binary to its resources.
#ifdef __APPLE__
Expand Down

0 comments on commit 293f85b

Please sign in to comment.