chore: harden trace file regex (#34563)
This commit is contained in:
parent
399ba91150
commit
da12af24c2
|
@ -335,7 +335,7 @@ async function mergeTraceFiles(fileName: string, temporaryTraceFiles: string[])
|
|||
// Keep the name for test traces so that the last test trace
|
||||
// that contains most of the information is kept in the trace.
|
||||
// Note the reverse order of the iteration (from new traces to old).
|
||||
} else if (entry.fileName.match(/[\d-]*trace\./)) {
|
||||
} else if (entry.fileName.match(/trace\.[a-z]*$/)) {
|
||||
entryName = i + '-' + entry.fileName;
|
||||
}
|
||||
if (entryNames.has(entryName)) {
|
||||
|
|
|
@ -43,7 +43,7 @@ export class TraceModel {
|
|||
const ordinals: string[] = [];
|
||||
let hasSource = false;
|
||||
for (const entryName of await this._backend.entryNames()) {
|
||||
const match = entryName.match(/(.+)\.trace/);
|
||||
const match = entryName.match(/(.+)\.trace$/);
|
||||
if (match)
|
||||
ordinals.push(match[1] || '');
|
||||
if (entryName.includes('src@'))
|
||||
|
|
Loading…
Reference in New Issue