Skip to content

Commit

Permalink
Revert "Fix RWC missing file detection (microsoft#46673)"
Browse files Browse the repository at this point in the history
This reverts commit 4a065f5.
  • Loading branch information
andrewbranch committed Nov 11, 2021
1 parent 7b86a65 commit 931b504
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/harness/harnessIO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 931b504

Please sign in to comment.