From 6c825ae88670ed25fe5e09588c2297b777301a05 Mon Sep 17 00:00:00 2001 From: Brett Sanderson Date: Tue, 22 Mar 2022 17:00:42 -0400 Subject: [PATCH] no error log on first start --- OpenpilotToolkit/Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenpilotToolkit/Program.cs b/OpenpilotToolkit/Program.cs index b5b3435..1a60de4 100644 --- a/OpenpilotToolkit/Program.cs +++ b/OpenpilotToolkit/Program.cs @@ -91,7 +91,11 @@ public static int Main(string[] args) try { - Directory.Delete(tempPath, true); + if (Directory.Exists(tempPath)) + { + Directory.Delete(tempPath, true); + } + Directory.CreateDirectory(tempPath); } catch (Exception e)