Browse Source

deploy-ng: Apply ignore rules before creating directories

Mitchell Stokes 8 years ago
parent
commit
923ff14d41
1 changed files with 7 additions and 6 deletions
  1. 7 6
      direct/src/showutil/dist.py

+ 7 - 6
direct/src/showutil/dist.py

@@ -225,6 +225,13 @@ class build_apps(distutils.core.Command):
                 src = os.path.normpath(src)
                 src = os.path.normpath(src)
                 dst = os.path.normpath(dst)
                 dst = os.path.normpath(dst)
 
 
+                for pattern in ignore_copy_list:
+                    #print("check ignore:", pattern, src, pattern.matches(src))
+                    if pattern.matches(src):
+                        print("skipping file", src)
+                        return
+
+
                 dst_dir = os.path.dirname(dst)
                 dst_dir = os.path.dirname(dst)
                 if not os.path.exists(dst_dir):
                 if not os.path.exists(dst_dir):
                     distutils.dir_util.mkpath(dst_dir)
                     distutils.dir_util.mkpath(dst_dir)
@@ -232,12 +239,6 @@ class build_apps(distutils.core.Command):
                 ext = os.path.splitext(src)[1]
                 ext = os.path.splitext(src)[1]
                 dst_root = os.path.splitext(dst)[0]
                 dst_root = os.path.splitext(dst)[0]
 
 
-                for pattern in ignore_copy_list:
-                    #print("check ignore:", pattern, src, pattern.matches(src))
-                    if pattern.matches(src):
-                        print("skipping file", src)
-                        return
-
                 if ext in self.build_scripts:
                 if ext in self.build_scripts:
                     dst_ext, script = self.build_scripts[ext]
                     dst_ext, script = self.build_scripts[ext]
                     dst = dst_root + dst_ext
                     dst = dst_root + dst_ext