summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/textual.cc2
-rw-r--r--test/regress/BF3C1F82-2.test4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/textual.cc b/src/textual.cc
index bc91ef52..b2108dcf 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -743,7 +743,7 @@ void instance_t::include_directive(char * line)
DEBUG("textual.include", "parent file path: " << context.pathname);
path parent_path = context.pathname.parent_path();
if (parent_path.empty()) {
- filename = path(string(".")) / line;
+ filename = context.current_directory / line;
} else {
filename = parent_path / line;
DEBUG("textual.include", "normalized path: " << filename.string());
diff --git a/test/regress/BF3C1F82-2.test b/test/regress/BF3C1F82-2.test
index 598af506..49a10e80 100644
--- a/test/regress/BF3C1F82-2.test
+++ b/test/regress/BF3C1F82-2.test
@@ -4,11 +4,11 @@ include non-existent-ledger-file-BF3C1F82
test -f - reg -> 1
__ERROR__
While parsing file "", line 2:
-Error: File to include was not found: "non-existent-ledger-file-BF3C1F82"
+Error: File to include was not found: "$sourcepath/non-existent-ledger-file-BF3C1F82"
end test
test -f /dev/stdin reg -> 1
__ERROR__
While parsing file "", line 2:
-Error: File to include was not found: "non-existent-ledger-file-BF3C1F82"
+Error: File to include was not found: "$sourcepath/non-existent-ledger-file-BF3C1F82"
end test