Fix issue #8818 - escape quotes in the license file when using the DragNDrop cpack generator. Thanks to Clinton Stimpson for the patch.
This commit is contained in:
parent
0f6c431180
commit
a091e99cb9
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue