Skip to content

Commit

Permalink
🐛 handle incident uri on windows
Browse files Browse the repository at this point in the history
Signed-off-by: David Zager <[email protected]>
  • Loading branch information
djzager committed Feb 3, 2025
1 parent 8449216 commit c6b0358
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webview-ui/src/components/IncidentTable/IncidentTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const IncidentTable: FC<IncidentTableProps> = ({
const relativeDirname = useCallback(
(incident: Incident) => {
const dir = path.dirname(incident.uri);
const re = new RegExp(`^${workspaceRoot}\\/*`);
return dir.replace(re, "");
const normalizedWorkspace = workspaceRoot.replace(/\\/g, "/");
return dir.replace(new RegExp(`^${normalizedWorkspace}\\/*`), "");
},
[workspaceRoot],
);
Expand Down

0 comments on commit c6b0358

Please sign in to comment.