]> git.ipfire.org Git - thirdparty/coreutils.git/commit
split: fix cases where -n l/... creates extraneous files
authorPádraig Brady <P@draigBrady.com>
Tue, 24 May 2011 08:59:08 +0000 (09:59 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 24 May 2011 15:29:48 +0000 (16:29 +0100)
commit7d44751f0ea9d353c14edffbf89dc61dcafa8f22
treebc5c62e21f1a4feb2173e6f9b6fd2a9113c1a36a
parent9ead32a9be9543af3f1b73080a7391c89b1d784b
split: fix cases where -n l/... creates extraneous files

* src/split.c (lines_chunk_split): Ensure that data is only
written to stdout when k specified.  Also ensure that
extra files are not created when there is more data available
than reported in the file size.
* tests/misc/split-lchunk: Verify that split -n l/k/n doesn't
generate any files, and that -n l/n always generates n files.
* NEWS: Mention the fix.
NEWS
src/split.c
tests/misc/split-lchunk