From: Holger Schurig Date: Fri, 26 Jun 2009 11:25:19 +0000 (+0200) Subject: webber: make sure file modification time is not earlier than X-Git-Url: https://oss.titaniummirror.com/gitweb?p=oss-web.git;a=commitdiff_plain;h=0de356a7eb42440f875243206ceebc1207ac6a8d webber: make sure file modification time is not earlier than file creation time ("ctime: ") --- diff --git a/webber.py b/webber.py index 29b4069..98b1106 100644 --- 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)