[Cmake-commits] [cmake-commits] david.cole committed cmCPackDragNDropGenerator.cxx 1.7 1.8

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Sep 28 17:14:55 EDT 2009


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv4744/Source/CPack

Modified Files:
	cmCPackDragNDropGenerator.cxx 
Log Message:
Fix issue #8818 - escape quotes in the license file when using the DragNDrop cpack generator. Thanks to Clinton Stimpson for the patch.


Index: cmCPackDragNDropGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDragNDropGenerator.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** cmCPackDragNDropGenerator.cxx	28 Sep 2009 15:42:50 -0000	1.7
--- cmCPackDragNDropGenerator.cxx	28 Sep 2009 21:14:53 -0000	1.8
***************
*** 380,383 ****
--- 380,390 ----
          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";
        }



More information about the Cmake-commits mailing list