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

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

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


From: Andrew Ferguson
Subject: [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/rpath.py
Date: Tue, 10 Jun 2008 13:14:52 +0000

CVSROOT:        /sources/rdiff-backup
Module name:    rdiff-backup
Changes by:     Andrew Ferguson <owsla> 08/06/10 13:14:52

Modified files:
        .              : CHANGELOG 
        rdiff_backup   : rpath.py 

Log message:
        Don't set modification times for directories on Windows. Also, assume
        that user has access to all files on Windows since there is no support
        for getuid(). (Patch from Josh Nisly)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.270&r2=1.271
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/rpath.py?cvsroot=rdiff-backup&r1=1.119&r2=1.120

Patches:
Index: CHANGELOG
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.270
retrieving revision 1.271
diff -u -b -r1.270 -r1.271
--- CHANGELOG   10 Jun 2008 13:09:26 -0000      1.270
+++ CHANGELOG   10 Jun 2008 13:14:52 -0000      1.271
@@ -1,6 +1,10 @@
 New in v1.1.16 (????/??/??)
 ---------------------------
 
+Don't set modification times for directories on Windows. Also, assume
+that user has access to all files on Windows since there is no support
+for getuid(). (Patch from Josh Nisly)
+
 Add Windows-specific logic for checking if another rdiff-backup process
 is running. Do not try to handle non-existant SIGHUP and SIGQUIT signals
 on Windows. (Patch from Josh Nisly)

Index: rdiff_backup/rpath.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/rpath.py,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -b -r1.119 -r1.120
--- rdiff_backup/rpath.py       10 Jun 2008 12:55:59 -0000      1.119
+++ rdiff_backup/rpath.py       10 Jun 2008 13:14:52 -0000      1.120
@@ -886,6 +886,11 @@
                except OverflowError:
                        log.Log("Cannot change mtime of %s to %s - problem is 
probably"
                                        "64->32bit conversion" % (self.path, 
modtime), 2)
+               except OSError:
+                       # It's not possible to set a modification time for
+                       # directories on Windows.
+                   if self.conn.os.name != 'nt' or not self.isdir():
+                       raise
                else: self.data['mtime'] = modtime
 
        def chown(self, uid, gid):
@@ -969,7 +974,10 @@
                
        def isowner(self):
                """Return true if current process is owner of rp or root"""
+               try:
                uid = self.conn.os.getuid()
+               except AttributeError:
+                   return True # Windows doesn't have getuid(), so hope for 
the best
                return uid == 0 or \
                           (self.data.has_key('uid') and uid == 
self.data['uid'])
 




reply via email to

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