Fixed #1371 (#include "foo\file.h" -> #include "foo/file.h" should be handled automatically on linux)
Linux can't open file paths with / separator. So we'll need to fix such include file paths (in source files) first.
This commit is contained in:
parent
5ab36d8a6d
commit
b384aabc52
|
@ -1397,7 +1397,11 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
|
|||
if (headerType == 1 && !fileOpened)
|
||||
{
|
||||
filename = paths.back() + filename;
|
||||
fin.open(filename.c_str());
|
||||
|
||||
// Linux can't open include paths with \ separator, so fix them
|
||||
std::string fixedname(filename);
|
||||
std::replace(fixedname.begin(), fixedname.end(), '\\', '/');
|
||||
fin.open(fixedname.c_str());
|
||||
if (fin.is_open())
|
||||
{
|
||||
fileOpened = true;
|
||||
|
|
Loading…
Reference in New Issue