From b7ae273fa34d588ed0977e8f93d6a45b8bb07187 Mon Sep 17 00:00:00 2001 From: Jakob Date: Mon, 30 Dec 2019 21:21:22 +0100 Subject: [PATCH] optimise startup a bit --- EnvyUpdate/MainWindow.xaml.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index 138a4b3..de69848 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -37,16 +37,19 @@ namespace EnvyUpdate Directory.CreateDirectory(appdata); } - try + if (exepath == appdata) { - if (Util.GetNewVer() != version && exepath == appdata) + try { - Util.UpdateApp(); + if (Util.GetNewVer() != version) + { + Util.UpdateApp(); + } + } + catch (WebException) + { + //Silently fail. } - } - catch (WebException) - { - //Silently fail. } if (Util.GetLocDriv() != null)