]> oss.titaniummirror.com Git - webber.git/blobdiff - webber.py
doc: misc fixes to page creation time ("ctime: "), which was after
[webber.git] / webber.py
index 194ce5cf3e93e4667f7f79245842948a19d2d6e4..98b1106c48d4cfcc30da7cfa7abdd23df5cabf05 100644 (file)
--- a/webber.py
+++ b/webber.py
@@ -107,6 +107,11 @@ class File(Holder):
                                continue
                        #print "txt:", s.rstrip().encode("iso-8859-1")
                        txt.append(s)
+
+               if self.mtime < self.ctime:
+                       log('%s: modification time cannot be before creation time' % self.rel_path)
+                       self.ctime = self.mtime
+
                self.contents = "".join(txt)
 
 
@@ -519,6 +524,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,