diff options
-rw-r--r-- | rdiff-backup/CHANGELOG | 3 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/rpath.py | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index fbc6afc..e4420b8 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.1.15 (????/??/??) --------------------------- +Print a more helpful error message when we get a "Result too large" +error when trying to copy a file. (Andrew Ferguson) + Fix bug where rdiff-backup fails after all increments are removed. Closes Savannah bug #20291. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index 7b71ff1..dbb49f6 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -125,7 +125,17 @@ def copy_reg_file(rpin, rpout, compress = 0): rpout.setdata() return v except AttributeError: pass - return rpout.write_from_fileobj(rpin.open("rb"), compress = compress) + try: + return rpout.write_from_fileobj(rpin.open("rb"), compress = compress) + except IOError, e: + if (e.errno == errno.ERANGE): + log.Log.FatalError("'IOError - Result too large' while reading %s. " + "If you are using a Mac, this is probably " + "the result of HFS+ filesystem corruption. " + "Please exclude this file from your backup " + "before proceeding." % rpin.path) + else: + raise def cmp(rpin, rpout): """True if rpin has the same data as rpout |