summaryrefslogtreecommitdiff
path: root/src/lexer.l
diff options
context:
space:
mode:
authordonbright <hugh.m.bright@gmail.com>2013-03-05 23:47:14 (GMT)
committerdonbright <hugh.m.bright@gmail.com>2013-03-05 23:47:14 (GMT)
commit42f21c3a0850083d245aa3ac346a53e876f0679e (patch)
treefacf41750e0fe27cc4cdaf352c9c8e687011d103 /src/lexer.l
parent422c668dcb538f181683ae51305bf8d3404f48d6 (diff)
parent4734172c3a16cc06b09e4d2131aa8e380bd0f226 (diff)
Merge pull request #288 from openscad/issue11_2
Issue11 2
Diffstat (limited to 'src/lexer.l')
-rw-r--r--src/lexer.l8
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);
}
contact: Jan Huwald // Impressum