Small cleanup

This commit is contained in:
Alexey Golub 2018-06-25 23:48:40 +03:00
parent 6fee160bc7
commit 61dce7c1a8

View file

@ -44,9 +44,9 @@ namespace DiscordChatExporter.Gui.ViewModels
Set(ref _format, value);
// Replace extension in path
var newExt = value.GetFileExtension();
if (FilePath != null && !FilePath.EndsWith(newExt))
FilePath = FilePath.SubstringUntilLast(".") + "." + newExt;
var ext = value.GetFileExtension();
if (FilePath != null)
FilePath = Path.ChangeExtension(FilePath, ext);
}
}