diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 31954b142..4035d0e15 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -1534,7 +1534,8 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filePath if (fileOpened) { - std::string tempFile = getFileLister()->simplifyPath(filename.c_str()); + filename = getFileLister()->simplifyPath(filename.c_str()); + std::string tempFile = filename; std::transform(tempFile.begin(), tempFile.end(), tempFile.begin(), tolowerWrapper); if (handledFiles.find(tempFile) != handledFiles.end()) {