mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Little changes
This commit is contained in:
parent
2b64b6c19c
commit
2529c8be88
2 changed files with 5 additions and 5 deletions
|
@ -52,11 +52,12 @@ public virtual int Open(string path, string args = null)
|
|||
psi.WorkingDirectory = Path.GetDirectoryName(path);
|
||||
|
||||
process.EnableRaisingEvents = true;
|
||||
process.OutputDataReceived += cli_OutputDataReceived;
|
||||
process.ErrorDataReceived += cli_ErrorDataReceived;
|
||||
if (psi.RedirectStandardOutput) process.OutputDataReceived += cli_OutputDataReceived;
|
||||
if (psi.RedirectStandardError) process.ErrorDataReceived += cli_ErrorDataReceived;
|
||||
process.StartInfo = psi;
|
||||
process.Start();
|
||||
process.BeginErrorReadLine();
|
||||
if (psi.RedirectStandardOutput) process.BeginOutputReadLine();
|
||||
if (psi.RedirectStandardError) process.BeginErrorReadLine();
|
||||
process.WaitForExit();
|
||||
return process.ExitCode;
|
||||
}
|
||||
|
|
|
@ -66,8 +66,7 @@ public string GetFFmpegCommands()
|
|||
int lastIndex = commands.LastIndexOf('"');
|
||||
if (lastIndex >= 0)
|
||||
{
|
||||
commands = commands.Remove(lastIndex);
|
||||
lastIndex = commands.LastIndexOf('"');
|
||||
lastIndex = commands.LastIndexOf('"', lastIndex - 1);
|
||||
if (lastIndex >= 0)
|
||||
{
|
||||
commands = commands.Remove(lastIndex);
|
||||
|
|
Loading…
Reference in a new issue