Commit 6f525081 authored by Karel Slaný's avatar Karel Slaný

Fixed problem with zfoFilesFromDir() where first entry was ignored.

parent f412b417
......@@ -131,8 +131,11 @@ QStringList zfoFilesFromDir(const QString &dirPath, bool subdirs)
if (subdirs) {
QDirIterator it(dirPath, filters, QDir::Files,
QDirIterator::Subdirectories);
while (it.hasNext()) {
filePathList.append(it.next());
if (!it.filePath().isEmpty()) {
filePathList.append(it.filePath());
while (it.hasNext()) {
filePathList.append(it.next());
}
}
} else {
directory.setPath(dirPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment