Commit ba2215cb090996f95a512af607296291a72eb108
Merge pull request #348 from biometrics/empty_gallery_updates
Better file count for emptyGallery
Showing
1 changed file
with
6 additions
and
1 deletions
openbr/plugins/gallery/empty.cpp
| ... | ... | @@ -40,7 +40,12 @@ class EmptyGallery : public Gallery |
| 40 | 40 | { |
| 41 | 41 | QDir dir(file.name); |
| 42 | 42 | QtUtils::touchDir(dir); |
| 43 | - gallerySize = dir.count(); | |
| 43 | + QDirIterator it(dir.absolutePath(), QDir::Files | QDir::NoDotAndDotDot, QDirIterator::Subdirectories); | |
| 44 | + gallerySize = 0; | |
| 45 | + while (it.hasNext()) { | |
| 46 | + it.next(); | |
| 47 | + gallerySize++; | |
| 48 | + } | |
| 44 | 49 | } |
| 45 | 50 | |
| 46 | 51 | TemplateList readBlock(bool *done) | ... | ... |