summaryrefslogtreecommitdiff
path: root/Source/cmGetFilenameComponentCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-18 10:56:40 -0500
committerBrad King <brad.king@kitware.com>2009-11-18 10:56:40 -0500
commit5fbefd66dcb28c3b835130ca226d041e53a62f2c (patch)
tree582fe767c16ddcacc9756815e8adf5951ed83b8c /Source/cmGetFilenameComponentCommand.cxx
parent77fddc1f651c1105335e9f9fea436c526257f5e2 (diff)
downloadcmake-5fbefd66dcb28c3b835130ca226d041e53a62f2c.tar.gz
Fix get_filename_component(... REALPATH) work dir
The commit "Fix get_filename_component ABSOLUTE mode" broke REALPATH treatment of relative paths because it stopped storing the absolute path in local variable 'filename'. This commit fixes the call to GetRealPath to use the proper local variable and adds a test.
Diffstat (limited to 'Source/cmGetFilenameComponentCommand.cxx')
-rw-r--r--Source/cmGetFilenameComponentCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx
index 31b833600c..1a31d5428f 100644
--- a/Source/cmGetFilenameComponentCommand.cxx
+++ b/Source/cmGetFilenameComponentCommand.cxx
@@ -101,7 +101,7 @@ bool cmGetFilenameComponentCommand
if(args[2] == "REALPATH")
{
// Resolve symlinks if possible
- result = cmSystemTools::GetRealPath(filename.c_str());
+ result = cmSystemTools::GetRealPath(result.c_str());
}
}
else