Commit 49cad812 authored by Nicolas Dumazet's avatar Nicolas Dumazet

Fix code if XML is bigger than size_lines and contained in several chunks


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35049 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent afec1809
......@@ -401,13 +401,14 @@ class Signature(Folder, SyncCode, File):
if size == size_lines:
self.partial_xml = next
elif size > size_lines:
overflow = size - size_lines
data_list = chunk[-1].split('\n')
chunk[-1] = '\n'.join(data_list[:size_lines])
chunk[-1] = '\n'.join(data_list[:-overflow])
if current is not None:
current.data = '\n'.join(data_list[size_lines:])
current.data = '\n'.join(data_list[-overflow:])
self.partial_xml = current
else:
self.partial_xml.data = '\n'.join(data_list[size_lines:])
self.partial_xml.data = '\n'.join(data_list[-overflow:])
return ''.join(chunk)
......
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