mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
fixed #5816: Handle illegal output file path
This commit is contained in:
parent
b03bf28dd1
commit
c7c4b0807a
1 changed files with 21 additions and 7 deletions
|
@ -135,9 +135,16 @@ private void UpdateOptions()
|
|||
lblVideoQualityValue.Text = Options.VideoQuality.ToString();
|
||||
|
||||
if (!Options.UseCustomArguments)
|
||||
{
|
||||
try
|
||||
{
|
||||
txtArguments.Text = Options.GetFFmpegArgs();
|
||||
}
|
||||
catch
|
||||
{
|
||||
txtArguments.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
lblVideoCodec.Visible = cbVideoCodec.Visible = !Options.UseCustomArguments;
|
||||
txtArguments.Visible = Options.UseCustomArguments;
|
||||
|
@ -159,6 +166,8 @@ private bool StartEncoding()
|
|||
ffmpeg.TrackEncodeProgress = true;
|
||||
ffmpeg.EncodeProgressChanged += Manager_EncodeProgressChanged;
|
||||
|
||||
try
|
||||
{
|
||||
string outputFilePath = Options.OutputFilePath;
|
||||
string args = Options.Arguments;
|
||||
result = ffmpeg.Run(args);
|
||||
|
@ -168,6 +177,11 @@ private bool StartEncoding()
|
|||
Helpers.OpenFolderWithFile(outputFilePath);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.ShowError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue