mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
ExternalCommandDestination.cs edited online, hope this compiles...
This commit is contained in:
parent
f2da7e23df
commit
631ed3b36c
1 changed files with 4 additions and 0 deletions
|
@ -132,17 +132,21 @@ namespace ExternalCommand {
|
||||||
p.StartInfo.FileName = commandline;
|
p.StartInfo.FileName = commandline;
|
||||||
p.StartInfo.Arguments = String.Format(arguments, fullPath);
|
p.StartInfo.Arguments = String.Format(arguments, fullPath);
|
||||||
p.StartInfo.UseShellExecute = false;
|
p.StartInfo.UseShellExecute = false;
|
||||||
|
if (!config.DoNotRedirect) {
|
||||||
p.StartInfo.RedirectStandardOutput = true;
|
p.StartInfo.RedirectStandardOutput = true;
|
||||||
|
}
|
||||||
if (verb != null) {
|
if (verb != null) {
|
||||||
p.StartInfo.Verb = verb;
|
p.StartInfo.Verb = verb;
|
||||||
}
|
}
|
||||||
LOG.Info("Starting : " + p.StartInfo.FileName + " " + p.StartInfo.Arguments);
|
LOG.Info("Starting : " + p.StartInfo.FileName + " " + p.StartInfo.Arguments);
|
||||||
p.Start();
|
p.Start();
|
||||||
p.WaitForExit();
|
p.WaitForExit();
|
||||||
|
if (!config.DoNotRedirect) {
|
||||||
output = p.StandardOutput.ReadToEnd();
|
output = p.StandardOutput.ReadToEnd();
|
||||||
if (output != null && output.Trim().Length > 0) {
|
if (output != null && output.Trim().Length > 0) {
|
||||||
LOG.Info("Output:\n" + output);
|
LOG.Info("Output:\n" + output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
LOG.Info("Finished : " + p.StartInfo.FileName + " " + p.StartInfo.Arguments);
|
LOG.Info("Finished : " + p.StartInfo.FileName + " " + p.StartInfo.Arguments);
|
||||||
return p.ExitCode;
|
return p.ExitCode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue