We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b87fe94 commit c5af8bdCopy full SHA for c5af8bd
1 file changed
extensions/ql-vscode/src/view/results/result-tables.tsx
@@ -27,8 +27,7 @@ import {
27
} from "./result-table-utils";
28
import { vscode } from "../vscode-api";
29
import { sendTelemetry } from "../common/telemetry";
30
-
31
-const FILE_PATH_REGEX = /^(?:.+[\\/])*(.+)$/;
+import { basename } from "path";
32
33
/**
34
* Properties for the `ResultTables` component.
@@ -302,7 +301,7 @@ export class ResultTables extends React.Component<
302
301
openFile(this.props.queryPath);
303
sendTelemetry("local-results-open-query-file");
304
};
305
- const fileName = FILE_PATH_REGEX.exec(this.props.queryPath)?.[1] || "query";
+ const fileName = basename(this.props.queryPath);
306
307
return (
308
<span className="vscode-codeql__table-selection-pagination">
0 commit comments