Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

csplit: don't panic on missing suppressed file #7292

Merged
merged 1 commit into from
Feb 10, 2025

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!

# for free to join this conversation on GitHub. Already have an account? # 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