Commit 48353a25 authored by daz's avatar daz Committed by Daz DeBoer
Browse files

Do not fail wrapper-validation on filename with illegal characters

parent 473878a7
Loading
Loading
Loading
Loading
+8 −3
Changes for sources/src/wrapper-validation/find.ts: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -18,9 +18,14 @@ async function recursivelyListFiles(baseDir: string): Promise<string[]> {
    const childrenPaths = await Promise.all(
        childrenNames.map(async childName => {
            const childPath = path.resolve(baseDir, childName)
            return fs.lstatSync(childPath).isDirectory()
                ? recursivelyListFiles(childPath)
                : new Promise(resolve => resolve([childPath]))
            const stat = fs.lstatSync(childPath, {throwIfNoEntry: false})
            if (stat === undefined) {
                return []
            } else if (stat.isDirectory()) {
                return recursivelyListFiles(childPath)
            } else {
                return new Promise(resolve => resolve([childPath]))
            }
        })
    )
    return Array.prototype.concat(...childrenPaths)