From 25f6593484951c32aaaf79da89d0b3acf352b0fe Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 14 Feb 2012 21:01:51 +0100 Subject: Fix bug including files from within an included file inside a folder. Reported by nop head. 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); } -- cgit v0.10.1