diff options
Diffstat (limited to 'tests/cgalpngtest.cc')
-rw-r--r-- | tests/cgalpngtest.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc index 81fc6b4..7b958de 100644 --- a/tests/cgalpngtest.cc +++ b/tests/cgalpngtest.cc @@ -113,9 +113,10 @@ int main(int argc, char **argv) exit(1); } - if (fs::path(filename).has_parent_path()) { - fs::current_path(fs::path(filename).parent_path()); - } + fs::path fpath = boosty::absolute(fs::path(filename)); + fs::path fparent = fpath.parent_path(); + fs::current_path(fparent); + top_ctx.setDocumentPath(fparent.string()); AbstractNode::resetIndexCounter(); AbstractNode *absolute_root_node = root_module->instantiate(&top_ctx, &root_inst); |