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/Main.py rdi..


From: Andrew Ferguson
Subject: [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/Main.py rdi...
Date: Sun, 23 Dec 2007 02:59:35 +0000

CVSROOT:        /sources/rdiff-backup
Module name:    rdiff-backup
Changes by:     Andrew Ferguson <owsla> 07/12/23 02:59:34

Modified files:
        .              : CHANGELOG 
        rdiff_backup   : Main.py rpath.py 

Log message:
        restore_set_root should check if it can read a directory before trying
        to list the contents. Closes Savannah bug #21106

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.247&r2=1.248
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/Main.py?cvsroot=rdiff-backup&r1=1.112&r2=1.113
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/rpath.py?cvsroot=rdiff-backup&r1=1.113&r2=1.114

Patches:
Index: CHANGELOG
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.247
retrieving revision 1.248
diff -u -b -r1.247 -r1.248
--- CHANGELOG   23 Dec 2007 02:48:41 -0000      1.247
+++ CHANGELOG   23 Dec 2007 02:59:34 -0000      1.248
@@ -1,6 +1,10 @@
 New in v1.1.15 (????/??/??)
 ---------------------------
 
+restore_set_root should check if it can read a particular directory
+before checking if "rdiff-backup-data" is contained in it. Closes
+Savannah bug #21106. (Patch from Alex Chapman)
+
 Regress.restore_orig_regfile should check if directories can be fsync'd
 before doing so. Fixes Savannah bug #21546. (Patch from Marc Horowitz)
 

Index: rdiff_backup/Main.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/Main.py,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- rdiff_backup/Main.py        26 Jul 2007 14:40:33 -0000      1.112
+++ rdiff_backup/Main.py        23 Dec 2007 02:59:34 -0000      1.113
@@ -598,7 +598,7 @@
        i = len(pathcomps)
        while i >= min_len_pathcomps:
                parent_dir = rpath.RPath(rpin.conn, "/".join(pathcomps[:i]))
-               if (parent_dir.isdir() and
+               if (parent_dir.isdir() and parent_dir.is_readable() and
                        "rdiff-backup-data" in parent_dir.listdir()): break
                if parent_dir.path == rpin.conn.Globals.get('restrict_path'):
                        return None

Index: rdiff_backup/rpath.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/rpath.py,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -b -r1.113 -r1.114
--- rdiff_backup/rpath.py       13 Aug 2007 16:11:15 -0000      1.113
+++ rdiff_backup/rpath.py       23 Dec 2007 02:59:34 -0000      1.114
@@ -599,6 +599,10 @@
                """Signal that rorp is a signature/diff for a hardlink file"""
                self.data['linked'] = index
 
+       def is_readable(self):
+               """Check whether user can read the file or directory"""
+               return self.conn.os.access(self.path, self.conn.os.R_OK)
+
        def open(self, mode):
                """Return file type object if any was given using 
self.setfile"""
                if mode != "rb": raise RPathException("Bad mode %s" % mode)




reply via email to

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