rdiff-backup-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/rpath.py


From: Ben Escoto
Subject: [Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/rpath.py
Date: Wed, 10 Aug 2005 01:47:57 -0400

Index: rdiff-backup/rdiff_backup/rpath.py
diff -u rdiff-backup/rdiff_backup/rpath.py:1.80 
rdiff-backup/rdiff_backup/rpath.py:1.81
--- rdiff-backup/rdiff_backup/rpath.py:1.80     Mon Aug  8 03:53:50 2005
+++ rdiff-backup/rdiff_backup/rpath.py  Wed Aug 10 05:47:56 2005
@@ -755,15 +755,23 @@
        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"""




reply via email to

[Prev in Thread] Current Thread [Next in Thread]