diff options
-rw-r--r-- | src/vsession.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp index bd86610..249594a 100644 --- a/src/vsession.cpp +++ b/src/vsession.cpp @@ -277,12 +277,16 @@ QList<Session*> VSession::readXmlDir(const QString& path) { myFilterScript.close(); } else { - // iterate over all .xml files in directory path and read them - foreach (QFileInfo fi, QDir(path).entryInfoList(QStringList("*.xml"))) { - retval.append(readXmlFile(fi.absoluteFilePath())); + // iterate over all .xml files in directory <path> (and sub-directories) + // and read them + QDirIterator di(path, + QDirIterator::Subdirectories | + QDirIterator::FollowSymlinks); + while(di.hasNext()) { + if (!di.next().endsWith(".xml")) continue; + retval.append(readXmlFile(di.fileInfo().absoluteFilePath())); } } - return retval; } |