[shotwell: 1/2] skip hidden sub-folders in enumerate_files() recursion



commit 42aac84edc10ef94e6d5750907eba4e08dbcfd0a
Author: Moritz <mo oclab net>
Date:   Sun Oct 7 14:17:53 2018 +0200

    skip hidden sub-folders in enumerate_files() recursion
    
    fixes #60

 src/camera/ImportPage.vala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index 08395908..b99bb79e 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -1493,8 +1493,12 @@ public class ImportPage : CheckerboardPage {
                 return false;
             }
             
-            if (!enumerate_files(fsid, append_path(dir, subdir), import_list))
-                return false;
+            if (subdir.has_prefix(".")) {
+                debug("Skipping hidden sub-folder %s in %s", subdir, dir);
+            } else {
+                if (!enumerate_files(fsid, append_path(dir, subdir), import_list))
+                    return false;
+            }
         }
         
         return true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]