mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
Quick check to circumvent regex in many cases (#164815)
* Quick check to circumvent regex in many cases * Fix logic
This commit is contained in:
parent
b7bbdc424f
commit
2ada565d06
|
@ -287,6 +287,11 @@ export function getPiiPathsFromEnvironment(paths: IPathEnvironment): string[] {
|
|||
*/
|
||||
function anonymizeFilePaths(stack: string, cleanupPatterns: RegExp[]): string {
|
||||
|
||||
// Fast check to see if it is a file path to avoid doing unnecessary heavy regex work
|
||||
if (!stack || (!stack.includes('/') && !stack.includes('\\'))) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
let updatedStack = stack;
|
||||
|
||||
const cleanUpIndexes: [number, number][] = [];
|
||||
|
|
Loading…
Reference in a new issue