ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/xmlTools/trunk/posUpdate/XmlPatch.cs
(Generate patch)

Comparing xmlTools/trunk/posUpdate/XmlPatch.cs (file contents):
Revision 742 by s10k, Tue Mar 26 02:30:48 2013 UTC vs.
Revision 745 by s10k, Tue Mar 26 15:04:38 2013 UTC

# Line 284 | Line 284 | namespace xmlTools
284                      string paramType = "";
285  
286                      // Filename already exists?
287 <                    if (command.IndexOf("filename:") != -1)
287 >                    if (Util.ContainsIgnoreCase(command,"filename:"))
288                      {
289                          paramType = "filename:";
290                      }
291 <                    else if (command.IndexOf("filename=") != -1)
291 >                    else if (Util.ContainsIgnoreCase(command, "filename="))
292                      {
293                          paramType = "filename=";
294                      }
# Line 304 | Line 304 | namespace xmlTools
304                          int endIdx = command.IndexOf(" ", startIdx); // it may end with space
305                          if (endIdx == -1)
306                          {
307 <                            endIdx = command.IndexOf("\"", startIdx); // or with quotes
307 >                            endIdx = command.IndexOf("\n", startIdx); // or with endline
308                          }
309                          string currFilename = command.Substring(startIdx, endIdx - startIdx);
310                          command = command.Replace(currFilename, this.forceFiles);
# Line 317 | Line 317 | namespace xmlTools
317                      command = command.Insert(command.Length - 1, " -nobackups"); // -1 to be inside quotes
318                  }
319  
320 <                command = command.Replace("\"", ""); // remove quotes
321 <
322 <                Program.Main(command.Split(' ')); // use the current process is more efficient than start a new one
320 >                Program.Main(Util.stringToArgsArray(command)); // use the current process is more efficient than start a new one
321              }
322              catch (Exception e)
323              {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)