On Windows, system and hidden files are now ignored in all file

enumeration loops.
Should fix "desktop.ini still displaying error" #1761
This commit is contained in:
bubnikv 2019-02-03 15:30:37 +01:00
parent 14a623f50e
commit f9743d17e9
8 changed files with 70 additions and 49 deletions

View file

@ -243,7 +243,7 @@ std::string PresetBundle::load_system_presets()
std::string errors_cummulative;
bool first = true;
for (auto &dir_entry : boost::filesystem::directory_iterator(dir))
if (boost::filesystem::is_regular_file(dir_entry.status()) && boost::algorithm::iends_with(dir_entry.path().filename().string(), ".ini")) {
if (Slic3r::is_ini_file(dir_entry)) {
std::string name = dir_entry.path().filename().string();
// Remove the .ini suffix.
name.erase(name.size() - 4);