diff options
-rw-r--r-- | src/openscad.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openscad.cc b/src/openscad.cc index 980e2af..11dad7c 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -275,8 +275,8 @@ int main(int argc, char **argv) fclose(fp); text << "\n" << commandline_commands; fs::path abspath = boosty::absolute( filename ); - std::string fname = boosty::stringy( abspath ); - root_module = parse(text.str().c_str(), fname.c_str(), false); + std::string fpath = boosty::stringy(abspath.parent_path()); + root_module = parse(text.str().c_str(), fpath.c_str(), false); if (!root_module) exit(1); } |