From 61dce7c1a8a0472c1a53b1a89996b98f83b4e9c4 Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Mon, 25 Jun 2018 23:48:40 +0300 Subject: [PATCH] Small cleanup --- DiscordChatExporter.Gui/ViewModels/ExportSetupViewModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DiscordChatExporter.Gui/ViewModels/ExportSetupViewModel.cs b/DiscordChatExporter.Gui/ViewModels/ExportSetupViewModel.cs index 12d80ed..b4b94e2 100644 --- a/DiscordChatExporter.Gui/ViewModels/ExportSetupViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/ExportSetupViewModel.cs @@ -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); } }