opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix: use case-insensitive path comparison on Windows to prevent duplicate projects

Open usvimal opened this issue 2 weeks ago • 1 comments

Summary

On Windows, file paths are case-insensitive but the project deduplication check used strict equality (===). This caused the same directory opened with different casing (e.g., C:\Users vs c:\Users) to appear as separate entries in the sidebar.

Changes

  • Added isWindows() helper to detect Windows platform
  • Added pathsEqual() helper for case-insensitive path comparison on Windows
  • Updated all path comparisons in projects.open/close/expand/collapse/move to use pathsEqual()

Testing

Tested on Windows 11 - opening the same directory with different path casing no longer creates duplicate sidebar entries.

usvimal avatar Jan 02 '26 05:01 usvimal