From bcde39204f0f15f207a10da59347db514936c617 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Jan 2024 09:04:34 +0200 Subject: Fix bug in import_load() (GH issue #357) --- libbuild2/file.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2') diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index 33f380d..88f1a9b 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -2726,6 +2726,9 @@ namespace build2 { name n; + if (src_root.empty ()) + src_root = root->src_path (); + n.dir = move (src_root); n.dir /= *altn ? alt_export_dir : std_export_dir; if (!tgt.dir.empty ()) @@ -2778,6 +2781,9 @@ namespace build2 if (cache_out_root.empty ()) cache_out_root = out_root; + if (src_root.empty ()) + src_root = root->src_path (); + ts.assign (ctx.var_out_root) = move (out_root); ts.assign (ctx.var_src_root) = move (src_root); -- cgit v1.1