diff options
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); } |