mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Existence check
This commit is contained in:
@@ -32,9 +32,9 @@ public class Startup
|
|||||||
{
|
{
|
||||||
string strExeFilePath = Application.ExecutablePath.Trim();
|
string strExeFilePath = Application.ExecutablePath.Trim();
|
||||||
string action = task.Definition.Actions.FirstOrDefault()!.ToString().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);
|
Logger.WriteLine("Rescheduling to: " + strExeFilePath);
|
||||||
UnSchedule();
|
UnSchedule();
|
||||||
Schedule();
|
Schedule();
|
||||||
|
|||||||
Reference in New Issue
Block a user