diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dumptest.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/dumptest.cc b/tests/dumptest.cc index 6851fb1..b75a2e2 100644 --- a/tests/dumptest.cc +++ b/tests/dumptest.cc @@ -132,7 +132,10 @@ int main(int argc, char **argv) fprintf(stderr, "Error: Unable to read back dumped file\n"); exit(1); } - fs::current_path(original_path); + + if (fs::path(filename).has_parent_path()) { + fs::current_path(fs::path(filename).parent_path()); + } AbstractNode::resetIndexCounter(); root_node = root_module->evaluate(&root_ctx, &root_inst); |