FIX: a / was appended without checking if there wasn't one already.
This commit is contained in:
parent
bde5ee3f44
commit
b8548c1db3
@ -159,7 +159,10 @@ void cmMakeDepend::GenerateDependInformation(cmDependInformation* info)
|
|||||||
t != m_IncludeDirectories.end(); ++t)
|
t != m_IncludeDirectories.end(); ++t)
|
||||||
{
|
{
|
||||||
std::string incpath = *t;
|
std::string incpath = *t;
|
||||||
incpath = incpath + "/";
|
if (incpath.size() && incpath[incpath.size() - 1] != '/')
|
||||||
|
{
|
||||||
|
incpath = incpath + "/";
|
||||||
|
}
|
||||||
incpath = incpath + path;
|
incpath = incpath + path;
|
||||||
if (srcFile->GetFullPath() == incpath)
|
if (srcFile->GetFullPath() == incpath)
|
||||||
{
|
{
|
||||||
@ -302,7 +305,10 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
|
|||||||
i != m_IncludeDirectories.end(); ++i)
|
i != m_IncludeDirectories.end(); ++i)
|
||||||
{
|
{
|
||||||
std::string path = *i;
|
std::string path = *i;
|
||||||
path = path + "/";
|
if (path.size() && path[path.size() - 1] != '/')
|
||||||
|
{
|
||||||
|
path = path + "/";
|
||||||
|
}
|
||||||
path = path + fname;
|
path = path + fname;
|
||||||
if(cmSystemTools::FileExists(path.c_str()))
|
if(cmSystemTools::FileExists(path.c_str()))
|
||||||
{
|
{
|
||||||
@ -313,7 +319,10 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
|
|||||||
if (extraPath)
|
if (extraPath)
|
||||||
{
|
{
|
||||||
std::string path = extraPath;
|
std::string path = extraPath;
|
||||||
path = path + "/";
|
if (path.size() && path[path.size() - 1] != '/')
|
||||||
|
{
|
||||||
|
path = path + "/";
|
||||||
|
}
|
||||||
path = path + fname;
|
path = path + fname;
|
||||||
if(cmSystemTools::FileExists(path.c_str()))
|
if(cmSystemTools::FileExists(path.c_str()))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user