Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/testfolderwatcher.cpp')
-rw-r--r--test/testfolderwatcher.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/testfolderwatcher.cpp b/test/testfolderwatcher.cpp
index d8c7da092..19011f5bd 100644
--- a/test/testfolderwatcher.cpp
+++ b/test/testfolderwatcher.cpp
@@ -127,8 +127,10 @@ public:
int countFolders(const QString &path)
{
int n = 0;
- for (const auto &sub : QDir(path).entryList(QDir::Dirs | QDir::NoDotAndDotDot))
+ const auto entryList = QDir(path).entryList(QDir::Dirs | QDir::NoDotAndDotDot);
+ for (const auto &sub : entryList) {
n += 1 + countFolders(path + '/' + sub);
+ }
return n;
}