From 6c3142a27c186ed4b02bf717ad2dafc37fe81440 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Tue, 23 Jun 2020 09:50:00 -0500 Subject: [PATCH] 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: