]> oss.titaniummirror.com Git - webber.git/commitdiff
webber: allow relative paths in cfg.exclude_files
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Thu, 25 Jun 2009 22:14:08 +0000 (00:14 +0200)
committerHolger Schurig <hs4233@mail.mn-solutions.de>
Thu, 25 Jun 2009 22:14:08 +0000 (00:14 +0200)
webber.py

index 194ce5cf3e93e4667f7f79245842948a19d2d6e4..29b40698986ff640ccc42d208639ad454e933e29 100644 (file)
--- a/webber.py
+++ b/webber.py
@@ -519,6 +519,13 @@ def walk_tree(dirpath):
                                if ok:
                                        #print "FILE", s
                                        rel_path = relpath(cfg.in_dir, full_path)
+                                       # Allow paths to be specified in exclude_files:
+                                       for e in cfg.exclude_files:
+                                               if fnmatch.fnmatch(rel_path, e):
+                                                       log("ignoring file %s" % rel_path, level=7)
+                                                       ok = False
+                                                       break
+                               if ok:
                                        log("reading file %s" % rel_path, level=5)
                                        file = File(
                                                path = full_path,