Skip to content

fix(path): preserve path casing on case-sensitive filesystems#48

Merged
jackiotyu merged 1 commit intojackiotyu:mainfrom
Samuel-Harris:fix/case-sensitive-filesystem-paths
Feb 28, 2026
Merged

fix(path): preserve path casing on case-sensitive filesystems#48
jackiotyu merged 1 commit intojackiotyu:mainfrom
Samuel-Harris:fix/case-sensitive-filesystem-paths

Conversation

@Samuel-Harris
Copy link
Contributor

@Samuel-Harris Samuel-Harris commented Feb 27, 2026

Summary

  • Fix toSimplePath() to only lowercase paths on Windows, preserving original casing on case-sensitive filesystems (Linux, case-sensitive macOS APFS)
  • Root cause: unconditional .toLowerCase() corrupted paths like /Volumes/solve-ssd/PatentCopilot into /volumes/solve-ssd/patentcopilot, causing git commands to fail with invalid cwd
  • This resolves the "Please open at least one Git repository in workspace" error on affected platforms

Test plan

  • pnpm run compile passes
  • pnpm run lint passes
  • pnpm run check-types passes
  • Verify on case-sensitive filesystem: extension detects git repos correctly (tested on MacOS Taho 26.3 with case-sensitive APFS)
  • Verify on Windows: case-insensitive path matching still works (I do not have a Windows computer, so I cannot test this)

🤖 Generated with Claude Code

toSimplePath() unconditionally lowercased all paths, which corrupted
paths on case-sensitive filesystems (Linux, case-sensitive macOS APFS).
Git operations would fail because the lowercased cwd did not exist,
causing the "Please open at least one Git repository in workspace" error.

Only apply toLowerCase() on Windows where the filesystem is
case-insensitive. The backslash normalization remains unconditional.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Owner

@jackiotyu jackiotyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jackiotyu jackiotyu merged commit 31d8143 into jackiotyu:main Feb 28, 2026
@jackiotyu
Copy link
Owner

Fix: #40

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.

2 participants