diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 12bf480143..91de87423b 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -3,6 +3,7 @@ #include #include +#include #if __APPLE__ #import @@ -96,9 +97,9 @@ std::vector scan_serial_ports() } #else // UNIX and OS X - boost::filesystem::recursive_directory_iterator end; + boost::filesystem::directory_iterator end; std::initializer_list prefixes { "ttyUSB" , "ttyACM", "tty.", "cu.", "rfcomm" }; - for (boost::filesystem::recursive_directory_iterator it_path(boost::filesystem::path("/dev")); + for (boost::filesystem::directory_iterator it_path(boost::filesystem::path("/dev")); it_path != end; ++ it_path) for (const char *prefix : prefixes) if (boost::starts_with(it_path->string(), std::string("/dev/") + prefix)) {