summaryrefslogtreecommitdiffstats
path: root/Source/cmMakeDepend.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-11-06 16:20:12 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-11-06 16:20:12 (GMT)
commitb8548c1db32c6a007744ddd177ab71e4f7121929 (patch)
treece685ff574956f96ba6a9f058cac7e1d834f8c64 /Source/cmMakeDepend.cxx
parentbde5ee3f44d58b6a2c2dc1c61be905cccf51b24f (diff)
downloadCMake-b8548c1db32c6a007744ddd177ab71e4f7121929.zip
CMake-b8548c1db32c6a007744ddd177ab71e4f7121929.tar.gz
CMake-b8548c1db32c6a007744ddd177ab71e4f7121929.tar.bz2
FIX: a / was appended without checking if there wasn't one already.
Diffstat (limited to 'Source/cmMakeDepend.cxx')
-rw-r--r--Source/cmMakeDepend.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx
index 1864504..a5ba60b 100644
--- a/Source/cmMakeDepend.cxx
+++ b/Source/cmMakeDepend.cxx
@@ -159,7 +159,10 @@ void cmMakeDepend::GenerateDependInformation(cmDependInformation* info)
t != m_IncludeDirectories.end(); ++t)
{
std::string incpath = *t;
- incpath = incpath + "/";
+ if (incpath.size() && incpath[incpath.size() - 1] != '/')
+ {
+ incpath = incpath + "/";
+ }
incpath = incpath + path;
if (srcFile->GetFullPath() == incpath)
{
@@ -302,7 +305,10 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
i != m_IncludeDirectories.end(); ++i)
{
std::string path = *i;
- path = path + "/";
+ if (path.size() && path[path.size() - 1] != '/')
+ {
+ path = path + "/";
+ }
path = path + fname;
if(cmSystemTools::FileExists(path.c_str()))
{
@@ -313,7 +319,10 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
if (extraPath)
{
std::string path = extraPath;
- path = path + "/";
+ if (path.size() && path[path.size() - 1] != '/')
+ {
+ path = path + "/";
+ }
path = path + fname;
if(cmSystemTools::FileExists(path.c_str()))
{