]> oss.titaniummirror.com Git - oss-web.git/blobdiff - webber.py
webber: make sure file modification time is not earlier than
[oss-web.git] / webber.py
index 29b40698986ff640ccc42d208639ad454e933e29..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)