fix: normalize forward slashes to backslashes for Windows directory matching#28240
fix: normalize forward slashes to backslashes for Windows directory matching#28240jcompagner wants to merge 1 commit into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several related PRs addressing similar Windows path normalization issues: Potential Related PRs:
These PRs appear to be addressing the same or very similar issues with Windows path separators causing session lookup failures. Recommend checking PR #26463 and #23862 in particular as they seem most directly related to the current issue (PR #28240). |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
…atching On Windows, the web UI frontend normalizes paths to forward slashes (C:/Users/...) but the database stores backslashes (C:\Users\...). This caused session list queries to return 0 results after a page refresh, because the directory filter did an exact string match. Add normalizeDirectory() that converts forward slashes to backslashes on Windows when the path looks like a drive letter path (X:/...). Apply it in the workspace-routing middleware and the session list handler.
1775290 to
410e86f
Compare
Issue for this PR
#28242
Closes #28242
Type of change
What does this PR do?
On Windows, the web UI frontend normalizes paths to forward slashes (C:/Users/...) but the database stores backslashes (C:\Users...). This caused session list queries to return 0 results after a page refresh, because the directory filter did an exact string match.
Add normalizeDirectory() that converts forward slashes to backslashes on Windows when the path looks like a drive letter path (X:/...). Apply it in the workspace-routing middleware and the session list handler.
How did you verify your code works?
i run the dev server and opened a project made some sessions and just refresh the page
Or just restart the server and let the browser reload itself, mostly on windows you loose all the sessions (or keep only 1 for some reason)
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.