diff options
author | Marius Kintel <marius@kintel.net> | 2013-03-06 18:08:31 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-03-06 18:08:31 (GMT) |
commit | cfc67f928fc86310614940f126d9f6c76d4e9ea7 (patch) | |
tree | 162be7579d3acd0eeb5b7b509ef9a0b428d6831f /src/lexer.l | |
parent | fe44758f5096be0e98c82d2cb0d54bdeffc4403a (diff) | |
parent | 974abf13049d5e73227418e3990af8a9bbf9db09 (diff) |
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src/lexer.l')
-rw-r--r-- | src/lexer.l | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lexer.l b/src/lexer.l index 63b0047..4dff654 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -225,6 +225,14 @@ void includefile() finfo = locate_file((fs::path(filepath) / filename).string()); } + if (!exists(finfo) || finfo.empty()) { + // deal with some unusual situations with is_absolute() and Wine + fs::path fnp( fs::path(filepath) / filename ); + if (fs::exists( fnp ) && !fs::is_directory( fnp )) { + finfo = fnp; + } + } + if (finfo.empty()) { PRINTB("WARNING: Can't find 'include' file '%s'.", filename); } |