diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 7c68f0f6e..98f66289d 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -213,8 +213,15 @@ void ICCStore::init (Glib::ustring usrICCDir, Glib::ustring rtICCDir) { void ICCStore::loadICCs(Glib::ustring rootDirName, bool nameUpper, std::map& resultProfiles, std::map &resultProfileContents) { if (rootDirName!="") { + std::deque qDirs; + + qDirs.push_front(rootDirName); + + while (qDirs.size()) { // process directory - Glib::ustring dirname = rootDirName; + Glib::ustring dirname = qDirs.back(); + qDirs.pop_back(); + Glib::Dir* dir = NULL; try { if (!safe_file_test (dirname, Glib::FILE_TEST_IS_DIR)) return; @@ -241,11 +248,12 @@ void ICCStore::loadICCs(Glib::ustring rootDirName, bool nameUpper, std::map