From 0ed7253f2d2edcc342b29c0cf3fcc16c0dc9b316 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Mon, 9 Mar 2015 14:58:56 -0400 Subject: [PATCH] Better file count for emptyGallery --- openbr/plugins/gallery/empty.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/gallery/empty.cpp b/openbr/plugins/gallery/empty.cpp index 56f5548..a361e3e 100644 --- a/openbr/plugins/gallery/empty.cpp +++ b/openbr/plugins/gallery/empty.cpp @@ -40,7 +40,12 @@ class EmptyGallery : public Gallery { QDir dir(file.name); QtUtils::touchDir(dir); - gallerySize = dir.count(); + QDirIterator it(dir.absolutePath(), QDir::Files | QDir::NoDotAndDotDot, QDirIterator::Subdirectories); + gallerySize = 0; + while (it.hasNext()) { + it.next(); + gallerySize++; + } } TemplateList readBlock(bool *done) -- libgit2 0.21.4