From 0fdab76a7470f41d02b56efbf0d4be41a85de556 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Sun, 12 Feb 2023 13:13:53 +0200 Subject: [PATCH] Fix tests --- DiscordChatExporter.Cli.Tests/Infra/ExportWrapper.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DiscordChatExporter.Cli.Tests/Infra/ExportWrapper.cs b/DiscordChatExporter.Cli.Tests/Infra/ExportWrapper.cs index e35df18c..d43d455d 100644 --- a/DiscordChatExporter.Cli.Tests/Infra/ExportWrapper.cs +++ b/DiscordChatExporter.Cli.Tests/Infra/ExportWrapper.cs @@ -25,7 +25,14 @@ public static class ExportWrapper static ExportWrapper() { - Directory.Delete(DirPath, true); + try + { + Directory.Delete(DirPath, true); + } + catch (DirectoryNotFoundException) + { + } + Directory.CreateDirectory(DirPath); }