summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackDragNDropGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-09-28 21:14:53 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-09-28 21:14:53 (GMT)
commita091e99cb9a126e6a2d0093a916450cf894be2f3 (patch)
tree03ac0044cc23cde86dbbf83e1a906938b2da6a88 /Source/CPack/cmCPackDragNDropGenerator.cxx
parent0f6c431180f0e565ba65feffa2246ffdbec1ed4f (diff)
downloadCMake-a091e99cb9a126e6a2d0093a916450cf894be2f3.zip
CMake-a091e99cb9a126e6a2d0093a916450cf894be2f3.tar.gz
CMake-a091e99cb9a126e6a2d0093a916450cf894be2f3.tar.bz2
Fix issue #8818 - escape quotes in the license file when using the DragNDrop cpack generator. Thanks to Clinton Stimpson for the patch.
Diffstat (limited to 'Source/CPack/cmCPackDragNDropGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 07cb35e..95324cf 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -379,6 +379,13 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& toplevel,
{
std::string line;
std::getline(ifs, line);
+ // escape quotes
+ std::string::size_type pos = line.find('\"');
+ while(pos != std::string::npos)
+ {
+ line.replace(pos, 1, "\\\"");
+ pos = line.find('\"', pos+2);
+ }
osf << " \"" << line << "\\n\"\n";
}
osf << "};\n";