mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
BUG-1560 added format-validation for the arguments-field
This commit is contained in:
parent
3f16a5d4f2
commit
d2558f2159
3 changed files with 24 additions and 2 deletions
|
@ -184,7 +184,7 @@ namespace ExternalCommand {
|
|||
if (!string.IsNullOrEmpty(commandline)) {
|
||||
using (Process process = new Process()) {
|
||||
process.StartInfo.FileName = commandline;
|
||||
process.StartInfo.Arguments = String.Format(arguments, fullPath);
|
||||
process.StartInfo.Arguments = FormatArguments(arguments, fullPath);
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
if (config.RedirectStandardOutput) {
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
|
@ -216,5 +216,10 @@ namespace ExternalCommand {
|
|||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public static string FormatArguments(string arguments, string fullpath)
|
||||
{
|
||||
return String.Format(arguments, fullpath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue