diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-19 16:48:57 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-19 16:48:57 (GMT) |
commit | 429cf9d612f92049ab80e558cbfd17874a724d9b (patch) | |
tree | 2d2b575b0cbee3f85f40f3c4b5c8c8785439cd39 /Source/cmCTest.cxx | |
parent | cafd48a7f2b7cbb041b863e9efc75b7fc24bafbf (diff) | |
download | CMake-429cf9d612f92049ab80e558cbfd17874a724d9b.zip CMake-429cf9d612f92049ab80e558cbfd17874a724d9b.tar.gz CMake-429cf9d612f92049ab80e558cbfd17874a724d9b.tar.bz2 |
BUG: Remove instances of // in the output
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 1de422e..eb1a74f 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2123,14 +2123,17 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, tm_VectorOfS } } -std::string cmCTest::GetShortPathToFile(const char* fname) +std::string cmCTest::GetShortPathToFile(const char* cfname) { const std::string& sourceDir = GetDartConfiguration("SourceDirectory"); const std::string& buildDir = GetDartConfiguration("BuildDirectory"); + std::string fname = cmSystemTools::CollapseFullPath(cfname); // Find relative paths to both directories - std::string srcRelpath = cmSystemTools::RelativePath(sourceDir.c_str(), fname); - std::string bldRelpath = cmSystemTools::RelativePath(buildDir.c_str(), fname); + std::string srcRelpath + = cmSystemTools::RelativePath(sourceDir.c_str(), fname.c_str()); + std::string bldRelpath + = cmSystemTools::RelativePath(buildDir.c_str(), fname.c_str()); // If any contains "." it is not parent directory bool inSrc = srcRelpath.find("..") == srcRelpath.npos; |