Fix issues with symlink directories

This commit is contained in:
Jacob Truman 2026-03-23 16:07:42 -06:00
parent 82aec5f60c
commit 2f89fd17b1
5 changed files with 18 additions and 8 deletions

View file

@ -66,7 +66,8 @@ describe('fileUtils', () => {
// Stub fs.readdir
readdirStub = sinon.stub(fs, 'readdir')
readdirStub.callsFake((path, callback) => {
const contents = mockDirContents.get(path)
const normalizedPath = path.replace(/\/+$/, '')
const contents = mockDirContents.get(normalizedPath)
if (contents) {
callback(null, contents)
} else {