From b8870ba3d52e53f3436c9e6b3cc88cfe083cdc72 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:25:53 +0200 Subject: [PATCH] Existence check --- app/Helpers/Startup.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Helpers/Startup.cs b/app/Helpers/Startup.cs index 7a8b00c2..38c9e9dc 100644 --- a/app/Helpers/Startup.cs +++ b/app/Helpers/Startup.cs @@ -32,9 +32,9 @@ public class Startup { string strExeFilePath = Application.ExecutablePath.Trim(); string action = task.Definition.Actions.FirstOrDefault()!.ToString().Trim(); - if (!strExeFilePath.Equals(action, StringComparison.OrdinalIgnoreCase)) + if (!strExeFilePath.Equals(action, StringComparison.OrdinalIgnoreCase) && !File.Exists(action)) { - Logger.WriteLine(action); + Logger.WriteLine("File doesn't exist: " + action); Logger.WriteLine("Rescheduling to: " + strExeFilePath); UnSchedule(); Schedule();