mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-24 19:56:38 +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:
@@ -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][] = [];
|
||||
|
||||
Reference in New Issue
Block a user