From a0e30bdc00ce9f72ec16588c365fb6113889f9d8 Mon Sep 17 00:00:00 2001 From: bescoto Date: Wed, 19 Oct 2005 02:27:30 +0000 Subject: short-term (?) kludge so missing carbonfile data doesn't cause crash git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@634 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/rdiff_backup/rpath.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 5f89072..ce86c92 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -4,6 +4,9 @@ New in v1.0.2 (????/??/??) Fix for bug 14545 which was introduced in version 1.0.1: Quoting caused a spurious security violation. (Important for Mac OS X) +An error reading carbonfile data on Mac OS X should no longer cause a +crash. (Thanks to Kevin Horton for testing.) + New in v1.0.1 (2005/09/10) -------------------------- diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index b9e84ca..95dd54f 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -1145,11 +1145,18 @@ class RPath(RORPath): self.data['carbonfile'] = cfile return cfile except MacOS.Error: + log.Log("Cannot read carbonfile information from %s" % + (self.path,), 2) self.data['carbonfile'] = None return self.data['carbonfile'] def write_carbonfile(self, cfile): """Write new carbon data to self.""" + if not cfile: + # This should be made cleaner---if you know Mac OS X tell + # me what could cause an error in get_carbonfile above + return + log.Log("Writing carbon data to %s" % (self.index,), 7) from Carbon.File import FSSpec import MacOS -- cgit v1.2.1