Fixed #1864 (Relative Path of #include-File doesn't work)
This commit is contained in:
parent
2fd2ab1712
commit
81d7a37b68
|
@ -1404,7 +1404,10 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
|
|||
std::string processedFile;
|
||||
bool fileOpened = false;
|
||||
std::ifstream fin;
|
||||
for (std::list<std::string>::const_iterator iter = includePaths.begin(); iter != includePaths.end(); ++iter)
|
||||
{
|
||||
std::list<std::string> includePaths2(includePaths);
|
||||
includePaths2.push_front("");
|
||||
for (std::list<std::string>::const_iterator iter = includePaths2.begin(); iter != includePaths2.end(); ++iter)
|
||||
{
|
||||
fin.open((*iter + filename).c_str());
|
||||
if (fin.is_open())
|
||||
|
@ -1416,6 +1419,7 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath
|
|||
|
||||
fin.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (headerType == UserHeader && !fileOpened)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue