Commit df384627 authored by owsla's avatar owsla

Warn if file modification time is before 1970.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@809 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent bc7c44fb
New in v1.1.12 (????/??/??)
---------------------------
Warn if file modification time is before 1970. (Andrew Ferguson)
New in v1.1.11 (2007/07/15)
---------------------------
......
......@@ -847,6 +847,8 @@ class RPath(RORPath):
def setmtime(self, modtime):
"""Set only modtime (access time to present)"""
log.Log(lambda: "Setting time of %s to %d" % (self.path, modtime), 7)
if modtime < 0: log.Log("Warning: modification time of %s is"
"before 1970" % self.path, 2)
try: self.conn.os.utime(self.path, (long(time.time()), modtime))
except OverflowError:
log.Log("Cannot change mtime of %s to %s - problem is probably"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment