summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx9
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;