fix: recurse in findAllWithExt
This commit is contained in:
parent
6ec406b7d0
commit
753e396705
1 changed files with 1 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue