From 9dd3943448b1a6cf9efa0b25058f67987d953f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20B=C3=B6rchers?= Date: Thu, 22 Mar 2018 08:09:23 +0100 Subject: [PATCH] Error in Katteker.Gui/Wrapper.cs when no configuration file was found. --- Creator/SetupTmpl.tt | 2 +- Katteker.Gui/Wrapper.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Creator/SetupTmpl.tt b/Creator/SetupTmpl.tt index 74aa2a1..9a9dce7 100644 --- a/Creator/SetupTmpl.tt +++ b/Creator/SetupTmpl.tt @@ -56,7 +56,7 @@ Section "install" ;No components page, name is not important <# foreach(var directory in Directories) { #><#= $" CreateDirectory \"$INSTDIR\\{directory}\"{Environment.NewLine}" #><# } #> ; Put file there -<#foreach(var file in Files) { #><#= $" File \"/oname={file.TargetPath}\" \"{file.SourcePath}\"{Environment.NewLine}" #><# } #> +<#foreach(var file in Files) { #><#= $" File \"/oname={file.Target}\" \"{file.Source}\"{Environment.NewLine}" #><# } #> WriteUninstaller "$INSTDIR\uninstall.exe" ; Desktop diff --git a/Katteker.Gui/Wrapper.cs b/Katteker.Gui/Wrapper.cs index b5eee77..1b7df27 100644 --- a/Katteker.Gui/Wrapper.cs +++ b/Katteker.Gui/Wrapper.cs @@ -26,10 +26,13 @@ namespace Katteker.Gui using (var window = new UpdateWindow()) { var dialogResult = DialogResult.Cancel; - if (!UpdateManager.TryCreate(out var manager) && !isStartup) + if (!UpdateManager.TryCreate(out var manager)) { - MessageBox.Show(Resources.SquirrelWrapper_CheckForUpdate, - Resources.SquirrelWrapper_CheckForUpdate_Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + if (!isStartup) + { + MessageBox.Show(Resources.SquirrelWrapper_CheckForUpdate, + Resources.SquirrelWrapper_CheckForUpdate_Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + } return; }