Check if fileName *starts* with /usr/

This commit is contained in:
Bertrand Bellenot 2013-08-24 15:55:22 +02:00 committed by sftnight
parent c6e144f046
commit 3575eb44f1

View File

@ -202,7 +202,7 @@ namespace cling {
if (std::find(loadedFiles.begin(),
loadedFiles.end(), fileName) == loadedFiles.end()) {
// filter out any /usr/...../bits/* file names
if (!(fileName.find("/usr/") != std::string::npos &&
if (!(fileName.compare(0, 5, "/usr/") == 0 &&
fileName.find("/bits/") != std::string::npos)) {
m_Outs << fileName << '\n';
}