From 5e4e29c4681331a35248b9b95ded94eb86dffb9d Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Wed, 23 Aug 2017 15:40:52 +1000
Subject: [PATCH] Correct mistake skipping hidden dirs

---
 io_sequencer_edl/__init__.py  | 5 ++---
 system_demo_mode/demo_mode.py | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/io_sequencer_edl/__init__.py b/io_sequencer_edl/__init__.py
index e2360d330..44f04d32d 100644
--- a/io_sequencer_edl/__init__.py
+++ b/io_sequencer_edl/__init__.py
@@ -115,9 +115,8 @@ class FindReelsEDL(Operator):
         def media_file_walker(path):
             ext_check = bpy.path.extensions_movie | bpy.path.extensions_audio
             for dirpath, dirnames, filenames in os.walk(path):
-                # skip '.svn'
-                if dirpath.startswith("."):
-                    continue
+                # skip '.git'
+                dirnames[:] = [d for d in dirnames if not d.startswith(".")]
                 for filename in filenames:
                     fileonly, ext = os.path.splitext(filename)
                     ext_lower = ext.lower()
diff --git a/system_demo_mode/demo_mode.py b/system_demo_mode/demo_mode.py
index b7986b737..ebf4b3105 100644
--- a/system_demo_mode/demo_mode.py
+++ b/system_demo_mode/demo_mode.py
@@ -517,9 +517,8 @@ def load_config(cfg_name=DEMO_CFG):
 
             def blend_dict_items(path):
                 for dirpath, dirnames, filenames in os.walk(path):
-                    # skip '.svn'
-                    if dirpath.startswith("."):
-                        continue
+                    # skip '.git'
+                    dirnames[:] = [d for d in dirnames if not d.startswith(".")]
                     for filename in filenames:
                         if filename.lower().endswith(".blend"):
                             filepath = os.path.join(dirpath, filename)
-- 
GitLab