+
Skip to content

Conversation

jfinkels
Copy link
Collaborator

Avoid a panic that would occur when attempting to remove a file that didn't exist. This would happen when scanning for a regular expression match, advancing by a positive offset, and suppressing empty files. For example, before this commit,

echo a | csplit -z - %a%1

would cause a panic. After this commit, the process terminates as expected: without error, without output, and without any files written.

Fixes #7251.

Avoid a panic that would occur when attempting to remove a file that
didn't exist. This would happen when scanning for a regular expression
match, advancing by a positive offset, and suppressing empty files. For
example, before this commit,

    echo a | csplit -z - %a%1

would cause a panic. After this commit, the process terminates as
expected: without error, without output, and without any files written.

Fixes uutils#7251.
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/misc/tee is no longer failing!
Congrats! The gnu test tests/csplit/csplit-heap is no longer SKIP! (might be PASS, ERROR or FAIL)

@cakebaker cakebaker merged commit fd94d36 into uutils:main Feb 10, 2025
65 checks passed
@cakebaker
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

csplit: panic when empty file is suppressed with % pattern with offset

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载