summaryrefslogtreecommitdiff
path: root/rdiff-backup
diff options
context:
space:
mode:
Diffstat (limited to 'rdiff-backup')
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py18
2 files changed, 16 insertions, 5 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index ca57603..730b483 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -40,6 +40,9 @@ Fixed selection bug reported by Daniel Richard G.
bug#13576: You can now back ACLs to a computer that doesn't have the
posix1e module.
+bug#13613: Fix for overflow error that could happen when backing up
+files with dates far in the future on a 64bit machine to a 32 bit one.
+
New in v0.13.6 (2005/04/07)
---------------------------
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index deb25f4..0b17934 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -755,15 +755,23 @@ class RPath(RORPath):
def settime(self, accesstime, modtime):
"""Change file modification times"""
log.Log("Setting time of %s to %d" % (self.path, modtime), 7)
- self.conn.os.utime(self.path, (accesstime, modtime))
- self.data['atime'] = accesstime
- self.data['mtime'] = modtime
+ try: self.conn.os.utime(self.path, (accesstime, modtime))
+ except OverflowError:
+ log.Log("Cannot change times of %s to %s - problem is probably"
+ "64->32bit conversion" %
+ (self.path, (accesstime, modtime)), 2)
+ else:
+ self.data['atime'] = accesstime
+ self.data['mtime'] = modtime
def setmtime(self, modtime):
"""Set only modtime (access time to present)"""
log.Log(lambda: "Setting time of %s to %d" % (self.path, modtime), 7)
- self.conn.os.utime(self.path, (long(time.time()), modtime))
- self.data['mtime'] = modtime
+ 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"
+ "64->32bit conversion" % (self.path, modtime), 2)
+ else: self.data['mtime'] = modtime
def chown(self, uid, gid):
"""Set file's uid and gid"""