summaryrefslogtreecommitdiff
path: root/rdiff-backup/src/selection.py
diff options
context:
space:
mode:
Diffstat (limited to 'rdiff-backup/src/selection.py')
-rw-r--r--rdiff-backup/src/selection.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/rdiff-backup/src/selection.py b/rdiff-backup/src/selection.py
index bd679de..aa98a49 100644
--- a/rdiff-backup/src/selection.py
+++ b/rdiff-backup/src/selection.py
@@ -125,11 +125,14 @@ class Select:
for subdir in FilenameMapping.get_quoted_dir_children(dsrpath):
for dsrp in rec_func(subdir, rec_func, sel_func): yield dsrp
else:
- dir_listing = dsrpath.listdir()
- dir_listing.sort()
- for filename in dir_listing:
- for dsrp in rec_func(dsrpath.append(filename),
- rec_func, sel_func): yield dsrp
+ for filename in Robust.listrp(dsrpath):
+ new_dsrp = Robust.check_common_error(
+ lambda: dsrpath.append(filename))
+ if not new_dsrp:
+ Log("Error initializing file %s" % dsrpath.path, 2)
+ else:
+ for dsrp in rec_func(new_dsrp, rec_func, sel_func):
+ yield dsrp
def iterate_starting_from(self, dsrpath, rec_func, sel_func):
"""Like Iterate, but only yield indicies > self.starting_index"""