Skip to content

Fix platform path separator handling - #2726

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue1715-1717-1725
May 31, 2026
Merged

Fix platform path separator handling#2726
Widthdom merged 3 commits into
mainfrom
fix-issue1715-1717-1725

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Preserve literal POSIX backslashes when normalizing ignore-rule comparison paths.
  • Harden project-root escape checks so Windows backslash traversal is rejected without treating POSIX backslashes as separators.
  • Update CLI project path detection to use platform path syntax and Windows drive/UNC recognition.

Validation

  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~FileIndexerTests.NormalizeIgnorePath_PosixPreservesLiteralBackslash|FullyQualifiedName~IndexCommandRunnerTests.IsOutsideProjectRoot|FullyQualifiedName~ProgramRunnerTests.IsProjectPathArg" -p:UseSharedCompilation=false
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll index . --commits a57ed0cce0f9fd2f855eca6842ea0ba1539486eb 88652f15e2447ceb6057a2f8f625a6f8f292a58c 2aa93b66fdc26ce2b2e639691343779419ba3bc8 --json
  • Adversarial review: No blocking/actionable issues found.

Documentation and Changelog

  • Added changelog.d/unreleased/1715.fixed.md.
  • Added changelog.d/unreleased/1717.fixed.md.
  • Added changelog.d/unreleased/1725.fixed.md.

Follow-up Candidates

Fixes #1715
Fixes #1717
Fixes #1725

@Widthdom
Widthdom marked this pull request as ready for review May 31, 2026 05:27
@Widthdom
Widthdom merged commit f424830 into main May 31, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue1715-1717-1725 branch May 31, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant