diff options
author | Brad King <brad.king@kitware.com> | 2006-08-25 16:11:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-08-25 16:11:21 (GMT) |
commit | b4e1de78869ddd08f84b18ed6a3398043533e7d7 (patch) | |
tree | 73d53a8b98713abe50f021ed230f67baa5e9ad7e /Source/cmFileCommand.cxx | |
parent | 24cdf8aa6c0dbf2b0b3eb45d70df334890ddae92 (diff) | |
download | CMake-b4e1de78869ddd08f84b18ed6a3398043533e7d7.zip CMake-b4e1de78869ddd08f84b18ed6a3398043533e7d7.tar.gz CMake-b4e1de78869ddd08f84b18ed6a3398043533e7d7.tar.bz2 |
BUG: Avoid putting double-slashes in fromFile during installation. Also added regex debugging copy of the expression in string form.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index dd96db8..72cd89c 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -393,7 +393,9 @@ public: { cmsys::RegularExpression Regex; MatchProperties Properties; - MatchRule(std::string const& regex): Regex(regex.c_str()) {} + std::string RegexString; + MatchRule(std::string const& regex): + Regex(regex.c_str()), RegexString(regex) {} }; std::vector<MatchRule> MatchRules; @@ -1268,8 +1270,11 @@ bool cmFileCommand::HandleInstallCommand( // Construct the full path to the source file. The file name may // have been changed above. std::string fromFile = fromDir; - fromFile += "/"; - fromFile += fromName; + if(!fromName.empty()) + { + fromFile += "/"; + fromFile += fromName; + } std::string message; if(!cmSystemTools::SameFile(fromFile.c_str(), toFile.c_str())) |