[Bf-extensions-cvs] [6f7db6d7] blender-v2.79-release: Correct mistake skipping hidden dirs

Campbell Barton noreply at git.blender.org
Mon Sep 4 15:17:31 CEST 2017


Commit: 6f7db6d775ebf6525f6f7cbbae5ed98a3a8dedc2
Author: Campbell Barton
Date:   Wed Aug 23 15:40:52 2017 +1000
Branches: blender-v2.79-release
https://developer.blender.org/rBA6f7db6d775ebf6525f6f7cbbae5ed98a3a8dedc2

Correct mistake skipping hidden dirs

===================================================================

M	io_sequencer_edl/__init__.py
M	system_demo_mode/demo_mode.py

===================================================================

diff --git a/io_sequencer_edl/__init__.py b/io_sequencer_edl/__init__.py
index e2360d33..44f04d32 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 b7986b73..ebf4b310 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)



More information about the Bf-extensions-cvs mailing list