Let prefix arguments to hasPathnamePrefix end in slash

...for better precision

Change-Id: I5f273b7c66ba931647805c415622b5ac767ff987
This commit is contained in:
Stephan Bergmann
2018-03-26 13:37:06 +02:00
parent cbd1f3695f
commit 449d416335
7 changed files with 15 additions and 15 deletions

View File

@@ -207,7 +207,7 @@ bool PluginHandler::checkIgnoreLocation(SourceLocation loc)
// generated into the start of hash.cxx, #if'ed for __GNUC__, but
// for clang-cl it is an issue)
return true;
if( hasPathnamePrefix(bufferName, WORKDIR) )
if( hasPathnamePrefix(bufferName, WORKDIR "/") )
{
// workdir/CustomTarget/vcl/unx/kde4/tst_exclude_socket_notifiers.moc
// includes
@@ -219,11 +219,11 @@ bool PluginHandler::checkIgnoreLocation(SourceLocation loc)
}
std::string s(bufferName);
normalizeDotDotInFilePath(s);
if (hasPathnamePrefix(s, WORKDIR))
if (hasPathnamePrefix(s, WORKDIR "/"))
return true;
}
if( hasPathnamePrefix(bufferName, BUILDDIR)
|| hasPathnamePrefix(bufferName, SRCDIR) )
if( hasPathnamePrefix(bufferName, BUILDDIR "/")
|| hasPathnamePrefix(bufferName, SRCDIR "/") )
return false; // ok
return true;
}