Fix weird issue where save as dialog does not handle "." nicely - thx Leon :)

Related to #5472
This commit is contained in:
niksedk 2021-11-14 12:54:02 +01:00
parent 26851cded3
commit a9bc1d4b7a

View File

@ -195,7 +195,7 @@ namespace Nikse.SubtitleEdit.Forms
buttonOK.Enabled = false;
numericUpDownFontSize.Enabled = false;
using (var saveDialog = new SaveFileDialog { FileName = SuggestNewVideoFileName(), Filter = "MP4|*.mp4|Matroska|*.mkv|WebM|*.webm" })
using (var saveDialog = new SaveFileDialog { FileName = SuggestNewVideoFileName(), Filter = "MP4|*.mp4|Matroska|*.mkv|WebM|*.webm", AddExtension = true })
{
if (saveDialog.ShowDialog(this) != DialogResult.OK)
{
@ -286,7 +286,7 @@ namespace Nikse.SubtitleEdit.Forms
fileName += ".x264";
}
return fileName;
return fileName.Replace(".", "_") + ".mp4";
}
private void FixRightToLeft(Subtitle subtitle)