diff options
author | Marius Kintel <marius@kintel.net> | 2012-03-20 11:05:18 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-03-20 11:05:18 (GMT) |
commit | b38310a837fc41dae26efcadbb8305a20d7034dc (patch) | |
tree | 2d57c6f9d1d29a10290a354c10e0674a955b35ff /tests/csgtexttest.cc | |
parent | e88ec1a6167bcd7490b0124e9e4a6041b80809be (diff) |
bugfix: Support passing files without an explicit parent directory
Diffstat (limited to 'tests/csgtexttest.cc')
-rw-r--r-- | tests/csgtexttest.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/csgtexttest.cc b/tests/csgtexttest.cc index 67e3416..6e18f20 100644 --- a/tests/csgtexttest.cc +++ b/tests/csgtexttest.cc @@ -95,7 +95,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_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); |