]> oss.titaniummirror.com Git - webber.git/commitdiff
webber: make sure file modification time is not earlier than
authorHolger Schurig <holgerschurig@gmx.de>
Fri, 26 Jun 2009 11:25:19 +0000 (13:25 +0200)
committerHolger Schurig <holgerschurig@gmx.de>
Fri, 26 Jun 2009 11:25:19 +0000 (13:25 +0200)
file creation time ("ctime: ")

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)