From 8cf1aca616e5cb5ac44efae8d89795691b4d6eb5 Mon Sep 17 00:00:00 2001 From: owsla Date: Fri, 19 Dec 2008 14:59:34 +0000 Subject: Support comments in rdiff-backup's ACL files and quote the quoting character properly if user changed it. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@974 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/rdiff_backup/eas_acls.py | 2 +- rdiff-backup/rdiff_backup/fs_abilities.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 1c885b1..d1f6379 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.2.3 (????/??/??) --------------------------- +Support comments in rdiff-backup's ACL files and quote the quoting character +properly if user changed it. (Patch from Oliver Mulatz) + Print a more helpful error message if we cannot read the backup destination. Closes Ubuntu bug #292586 (again). (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/eas_acls.py b/rdiff-backup/rdiff_backup/eas_acls.py index 02f163c..7052373 100644 --- a/rdiff-backup/rdiff_backup/eas_acls.py +++ b/rdiff-backup/rdiff_backup/eas_acls.py @@ -229,7 +229,7 @@ class AccessControlLists: """Set self.entry_list and self.default_entry_list from text""" self.entry_list, self.default_entry_list = [], [] for line in text.split('\n'): - comment_pos = text.find('#') + comment_pos = line.find('#') if comment_pos >= 0: line = line[:comment_pos] line = line.strip() if not line: continue diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py index 902242b..aeb0125 100644 --- a/rdiff-backup/rdiff_backup/fs_abilities.py +++ b/rdiff-backup/rdiff_backup/fs_abilities.py @@ -742,7 +742,8 @@ class BackupSetGlobals(SetGlobals): # Quote ", *, /, :, <, >, ?, \, |, and 127 (DEL) ctq.append('\"*/:<>?\\\\|\177') - if ctq: ctq.append(';') # Quote quoting char if quoting anything + # Quote quoting char if quoting anything + if ctq: ctq.append(Globals.quoting_char) return "".join(ctq) def compare_ctq_file(self, rbdir, suggested_ctq, force): -- cgit v1.2.1