mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 04:30:49 +12:00
fixed #5816: Handle illegal output file path
This commit is contained in:
parent
b03bf28dd1
commit
c7c4b0807a
|
@ -136,7 +136,14 @@ private void UpdateOptions()
|
||||||
|
|
||||||
if (!Options.UseCustomArguments)
|
if (!Options.UseCustomArguments)
|
||||||
{
|
{
|
||||||
txtArguments.Text = Options.GetFFmpegArgs();
|
try
|
||||||
|
{
|
||||||
|
txtArguments.Text = Options.GetFFmpegArgs();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
txtArguments.Text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lblVideoCodec.Visible = cbVideoCodec.Visible = !Options.UseCustomArguments;
|
lblVideoCodec.Visible = cbVideoCodec.Visible = !Options.UseCustomArguments;
|
||||||
|
@ -159,13 +166,20 @@ private bool StartEncoding()
|
||||||
ffmpeg.TrackEncodeProgress = true;
|
ffmpeg.TrackEncodeProgress = true;
|
||||||
ffmpeg.EncodeProgressChanged += Manager_EncodeProgressChanged;
|
ffmpeg.EncodeProgressChanged += Manager_EncodeProgressChanged;
|
||||||
|
|
||||||
string outputFilePath = Options.OutputFilePath;
|
try
|
||||||
string args = Options.Arguments;
|
|
||||||
result = ffmpeg.Run(args);
|
|
||||||
|
|
||||||
if (Options.AutoOpenFolder && result && !ffmpeg.StopRequested)
|
|
||||||
{
|
{
|
||||||
Helpers.OpenFolderWithFile(outputFilePath);
|
string outputFilePath = Options.OutputFilePath;
|
||||||
|
string args = Options.Arguments;
|
||||||
|
result = ffmpeg.Run(args);
|
||||||
|
|
||||||
|
if (Options.AutoOpenFolder && result && !ffmpeg.StopRequested)
|
||||||
|
{
|
||||||
|
Helpers.OpenFolderWithFile(outputFilePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.ShowError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue