diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-27 21:56:36 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-31 21:18:43 (GMT) |
commit | 4959f3413c83f38dd222dced11d7a3933e145ae4 (patch) | |
tree | ebf654540e8324b215b6e5c88df9635e33d4420b /Source/cmSourceFileLocation.cxx | |
parent | fcc9287897dd9b378c2f87329346c2f23becd54f (diff) | |
download | CMake-4959f3413c83f38dd222dced11d7a3933e145ae4.zip CMake-4959f3413c83f38dd222dced11d7a3933e145ae4.tar.gz CMake-4959f3413c83f38dd222dced11d7a3933e145ae4.tar.bz2 |
cmSourceFileLocation: Collapse full path for directory comparisons.
Otherwise Matches() ends up doing a comparison of
the directories
/path/to/dir/subdir/..
and
/path/to/dir
as strings and not matching where it should.
Diffstat (limited to 'Source/cmSourceFileLocation.cxx')
-rw-r--r-- | Source/cmSourceFileLocation.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 24e646f..c050202 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -60,6 +60,11 @@ cmSourceFileLocation this->AmbiguousDirectory = !cmSystemTools::FileIsFullPath(name.c_str()); this->AmbiguousExtension = true; this->Directory = cmSystemTools::GetFilenamePath(name); + if (cmSystemTools::FileIsFullPath(this->Directory.c_str())) + { + this->Directory + = cmSystemTools::CollapseFullPath(this->Directory.c_str()); + } this->Name = cmSystemTools::GetFilenameName(name); this->UpdateExtension(name); } |