Skip to content

fix(core): normalize file watcher paths to forward slashes - #41240

Open
LHMQ878 wants to merge 1 commit into
anomalyco:devfrom
LHMQ878:fix/watcher-forward-slash-paths
Open

fix(core): normalize file watcher paths to forward slashes#41240
LHMQ878 wants to merge 1 commit into
anomalyco:devfrom
LHMQ878:fix/watcher-forward-slash-paths

Conversation

@LHMQ878

@LHMQ878 LHMQ878 commented Aug 8, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #35329

Type of change

  • Bug fix

What does this PR do?

The native file watcher emits backslash paths on Windows, but the rest of OpenCode compares paths with forward slashes. Normalize watcher event paths to / on win32 before publishing file.watcher.updated events.

How did you verify your code works?

Added normalizeEventPath converts backslashes on Windows in packages/core/test/filesystem/watcher.test.ts.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Parcel watcher emits backslash paths on Windows while the rest of the
codebase compares paths with forward slashes. Normalize watcher events on
win32 before publishing.
@LHMQ878
LHMQ878 force-pushed the fix/watcher-forward-slash-paths branch from fe29ec7 to 3c21094 Compare August 8, 2026 09:17
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.

File watcher emits backslash paths on Windows

1 participant