diff options
author | Marius Kintel <marius@kintel.net> | 2012-02-14 20:01:51 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-02-14 20:01:51 (GMT) |
commit | 25f6593484951c32aaaf79da89d0b3acf352b0fe (patch) | |
tree | ba76d2b7a61474d92f76619ee15ab1045123b86f /src/openscad.cc | |
parent | a83fda0c3d9e92a6e47622cd1c2fdeebdfbb8c1a (diff) |
Fix bug including files from within an included file inside a folder. Reported by nop head.
Diffstat (limited to 'src/openscad.cc')
-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); } |