--- xmlTools/trunk/posUpdate/XmlPatch.cs 2013/03/26 02:30:48 742 +++ xmlTools/trunk/posUpdate/XmlPatch.cs 2013/03/26 15:04:38 745 @@ -284,11 +284,11 @@ namespace xmlTools string paramType = ""; // Filename already exists? - if (command.IndexOf("filename:") != -1) + if (Util.ContainsIgnoreCase(command,"filename:")) { paramType = "filename:"; } - else if (command.IndexOf("filename=") != -1) + else if (Util.ContainsIgnoreCase(command, "filename=")) { paramType = "filename="; } @@ -304,7 +304,7 @@ namespace xmlTools int endIdx = command.IndexOf(" ", startIdx); // it may end with space if (endIdx == -1) { - endIdx = command.IndexOf("\"", startIdx); // or with quotes + endIdx = command.IndexOf("\n", startIdx); // or with endline } string currFilename = command.Substring(startIdx, endIdx - startIdx); command = command.Replace(currFilename, this.forceFiles); @@ -317,9 +317,7 @@ namespace xmlTools command = command.Insert(command.Length - 1, " -nobackups"); // -1 to be inside quotes } - command = command.Replace("\"", ""); // remove quotes - - Program.Main(command.Split(' ')); // use the current process is more efficient than start a new one + Program.Main(Util.stringToArgsArray(command)); // use the current process is more efficient than start a new one } catch (Exception e) {