Fix bug in file visitor target handler 80/77780/1
authorKyungwook Tak <k.tak@samsung.com>
Fri, 1 Jul 2016 05:47:31 +0000 (14:47 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Fri, 1 Jul 2016 05:48:31 +0000 (14:48 +0900)
Continue for loop without call recursive for target

Change-Id: Ibda767ddecfe6582cb02fbc9585cacc35f87894d
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
src/framework/service/file-system.cpp

index 934654a..214761d 100644 (file)
@@ -309,11 +309,12 @@ void FsVisitor::run(const DirPtr &dirptr, const FilePtr &currentdir)
                                }
                        }
 
-                       if (this->m_isBasedOnName && ncurrentdir->isInApp())
+                       if (this->m_isBasedOnName && ncurrentdir->isInApp()) {
                                this->m_targetHandler(ncurrentdir);
-
-                       DEBUG("recurse dir : " << fullpath);
-                       this->run(ndirptr, ncurrentdir);
+                       } else {
+                               DEBUG("recurse dir : " << fullpath);
+                               this->run(ndirptr, ncurrentdir);
+                       }
                } else if (result->d_type == DT_REG) {
                        try {
                                auto fileptr = File::createIfModified(fullpath, currentdir, this->m_since);