Fix findFile with regex
This commit is contained in:
parent
d07bd2d71e
commit
6c3142a27c
1 changed files with 2 additions and 1 deletions
|
|
@ -393,7 +393,8 @@ proc findFiles*(file: string, dir: string, recurse = true, regex = false): seq[s
|
|||
var
|
||||
dir = dir
|
||||
file = file
|
||||
if not recurse:
|
||||
# If file = `path/file`, adjust dir = `dir/path` and search for new file
|
||||
if not (recurse or regex):
|
||||
let
|
||||
pdir = file.parentDir()
|
||||
if pdir.len != 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue