Skip to content

Commit 31d8143

Browse files
fix(path): preserve path casing on case-sensitive filesystems (#48)
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>
1 parent d7287a4 commit 31d8143

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/core/util/path.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import path from 'path';
22

33
function toSimplePath(path: string) {
4-
return path.toLowerCase().replace(/\\/g, '/');
4+
const normalized = path.replace(/\\/g, '/');
5+
return process.platform === 'win32' ? normalized.toLowerCase() : normalized;
56
}
67

78
function comparePath(path1: string = '', path2: string = '') {

0 commit comments

Comments
 (0)