Commit ccfe9017 authored by owsla's avatar owsla

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@860 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 37307976
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)
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment