Repository navigation
fix(paths): fold csplit -f/--prefix through the shared argv boundary (#1276) - #1278
Merged
Merged
Conversation
…1276) The -f/--prefix operand feeds each derived output filename, which the bare ofstream resolved literally: a dialect spelling like "/e/xx-" was opened relative to the cwd drive instead of the named drive. Normalize the filename once at materialization so the ofstream and cleanup's remove share one resolved spelling - the same pattern as the sort -T fix in #1274. Regression test: "-f /d/..." through the external path asserts the segments land in the named directory. Fixes #1276. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
csplit's-f/--prefixoperand flows into every derived output filename, which a barestd::ofstreamresolved literally (src/commands/csplit.cpp): a drive-dialect spelling like/e/xx-was opened relative to the cwd's drive instead of the named drive — the same blind spot family assort -Tin fix(paths): resolve bare MSYS drive-root operands through the shared argv boundary (#1230) #1274.native_path::normalize_api_operandonce at materialization, so theofstreamandcleanup()'sstd::filesystem::removeshare one resolved native spelling (/e/xx-00→E:\xx-00).Test plan
csplit.csplit_prefix_drive_dialect_writes_named_directory:-f /d/<tmp>/seg-through the external path assertsseg-00/seg-01land in the named directory with the right contentswinuxcmd-tests.exe --gtest_filter=csplit.*: 18/18 passed (MSVC Debug build)Fixes #1276.
Generated with Devin