summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-12-25 03:45:13 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-12-25 03:45:13 +0000
commit286cc36496793337279c56b881418aa31590a2da (patch)
treea628ae378f37c7fb963cd63e0e5b4fca18b2be9e
parent82eebfb36d649dc0abdc09952f24af14e162e976 (diff)
downloadrdiff-backup-286cc36496793337279c56b881418aa31590a2da.tar.gz
Print a more helpful error message when we get a "Result too large" error
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@860 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py12
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