git://developer.intra2net.com
/
python-delta-tar
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
415c5e6
)
Fixed filesplit corner case infinite loop
author
Daniel Garcia Moreno
<danigm@wadobo.com>
Tue, 16 Jul 2013 08:24:59 +0000 (10:24 +0200)
committer
Daniel Garcia Moreno
<danigm@wadobo.com>
Tue, 16 Jul 2013 08:24:59 +0000 (10:24 +0200)
filesplit.py
patch
|
blob
|
blame
|
history
diff --git
a/filesplit.py
b/filesplit.py
index
b06d99a
..
ef7129d
100644
(file)
--- a/
filesplit.py
+++ b/
filesplit.py
@@
-63,7
+63,7
@@
def split_file(separator, prefix, input_file, new_file_func=None):
# corner case: separator is between this buf and next one. In this
# case, we write to current output everything before that and
# iterate
- if separator[0] in buf[-sep_len:]:
+ if len(buf) > sep_len and separator[0] in buf[-sep_len:]:
output.write(buf[:-sep_len])
buf = buf[-sep_len:]
continue