GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(app): preserve native path separators in file path helpers by Hona · Pull Request #14912 · anomalyco/opencode Conversation
Member
SummaryThe Cygwin fix (a74fedd) normalized all paths to Fix: Canonicalize to
Reverts the UI regression from #13659 while keeping the Cygwin compatibility.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Hona
force-pushed
the
fix/path-helpers-native-separators
branch
from
79ee9d3 to
8a4ef00
Compare
Hona
force-pushed
the
fix/path-helpers-native-separators
branch
from
8a4ef00 to
e57fe7d
Compare
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewThis pull request fixes a UI regression introduced in PR #13659 where Windows file paths were displayed with forward slashes ( Changes:
Reviewed changesCopilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
| expect(path.normalize("c:\\repo\\src\\app.ts")).toBe("src\\app.ts") | |
| expect(path.normalize("c:\\repo\\src\\app.ts")).toBe("src\\app.ts") | |
| // Cygwin-style paths should also normalize against the Windows root | |
| expect(path.normalize("/c/repo/src/app.ts")).toBe("src/app.ts") | |
| expect(path.normalize("/cygdrive/c/repo/src/app.ts")).toBe("src/app.ts") |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Only case-insensitive on Windows (drive letter or UNC paths) | ||
| const windows = /^[A-Za-z]:/.test(root) || root.startsWith("\\\\") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The canonicalization always lowercases both the root and path, even on non-Windows systems. This could cause issues on case-sensitive filesystems (Linux/Mac) where "/repo/Src/app.ts" and "/repo/src/app.ts" are different files. The original code only applied case-insensitive matching on Windows (when root started with a drive letter). Consider adding back the Windows detection to only lowercase on Windows systems.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.