| 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 |
|
} |
| 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); |
| 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 |
|
{ |