fix: recurse in findAllWithExt

This commit is contained in:
Sebastian Ullrich 2022-01-14 18:59:58 +01:00
parent 6ec406b7d0
commit 753e396705

View file

@ -41,9 +41,7 @@ def findAllWithExt (sp : SearchPath) (ext : String) : IO (Array FilePath) := do
let mut paths := #[]
for p in sp do
if (← p.isDir) then
for e in (← p.readDir) do
if e.fileName.endsWith s!".{ext}" then
paths := paths.push e.path
paths := paths ++ (← p.walkDir).filter (·.extension == some ext)
paths
end SearchPath