From 931b504836c13218f81f43c0e0211bec3535ac30 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 11 Nov 2021 14:21:07 -0800 Subject: [PATCH] Revert "Fix RWC missing file detection (#46673)" This reverts commit 4a065f524c1f843df297f6ee01313c6bc31d4f65. --- src/harness/harnessIO.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 0f1647b729427..bf9f45d8826b4 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1438,15 +1438,14 @@ namespace Harness { } const referenceDir = referencePath(relativeFileBase, opts && opts.Baselinefolder, opts && opts.Subfolder); - let existing = IO.readDirectory(referenceDir, referencedExtensions || [extension]); // always an _absolute_ path + let existing = IO.readDirectory(referenceDir, referencedExtensions || [extension]); if (extension === ".ts" || referencedExtensions && referencedExtensions.indexOf(".ts") > -1 && referencedExtensions.indexOf(".d.ts") === -1) { // special-case and filter .d.ts out of .ts results existing = existing.filter(f => !ts.endsWith(f, ".d.ts")); } const missing: string[] = []; - const absoluteTestDir = `${process.cwd()}/${referenceDir}`; for (const name of existing) { - const localCopy = name.substring(absoluteTestDir.length - relativeFileBase.length); + const localCopy = name.substring(referenceDir.length - relativeFileBase.length); if (!writtenFiles.has(localCopy)) { missing.push(localCopy); }