From 30def3f502fc0af8bbe9b08726f82da0d3ef2d89 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Tue, 23 Jun 2020 09:50:00 -0500 Subject: Fix findFile with regex --- nimterop/build/shell.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nimterop/build/shell.nim b/nimterop/build/shell.nim index 235f7b5..5179798 100644 --- a/nimterop/build/shell.nim +++ b/nimterop/build/shell.nim @@ -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: -- cgit v1.2.3