diff options
Diffstat (limited to 'build2/search.cxx')
-rw-r--r-- | build2/search.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/build2/search.cxx b/build2/search.cxx index 6d0a5e9..68191f5 100644 --- a/build2/search.cxx +++ b/build2/search.cxx @@ -107,8 +107,14 @@ namespace build2 // Check if there is a file. // const dir_path& s (pk.scope->src_path ()); - path f (s / *tk.dir / path (*tk.name)); - f.normalize (); + + path f (s); + if (!tk.dir->empty ()) + { + f /= *tk.dir; + f.normalize (); + } + f /= *tk.name; if (!ext->empty ()) { |