diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-02-14 04:55:19 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-02-14 04:55:19 (GMT) |
commit | d5019a964e376e8ad0ad398cc4cfb3d97509402d (patch) | |
tree | 0cb9b316ff1aff9a7befec2b6630f93746776d1b /src/lexer.l | |
parent | c1b1d0992f78ecafb4212994207ee7cc7cbb6b39 (diff) |
deal with test suite issues under mingw-cross compile and wine
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); } |