From 9672d162d327e700d0fd04eff628b61275f88309 Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 23 Mar 2026 20:55:11 +0200 Subject: [PATCH] Update DiscordChatExporter.Gui/Publish-MacOSBundle.csx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- DiscordChatExporter.Gui/Publish-MacOSBundle.csx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DiscordChatExporter.Gui/Publish-MacOSBundle.csx b/DiscordChatExporter.Gui/Publish-MacOSBundle.csx index 57215379..ca886a72 100644 --- a/DiscordChatExporter.Gui/Publish-MacOSBundle.csx +++ b/DiscordChatExporter.Gui/Publish-MacOSBundle.csx @@ -39,6 +39,10 @@ public class PublishMacOSBundleCommand : ICommand var tempDirPath = Path.GetFullPath( Path.Combine(publishDirPath, "../publish-macos-app-temp") ); + + // Ensure the temporary directory is clean before use in case a previous run crashed + if (Directory.Exists(tempDirPath)) + Directory.Delete(tempDirPath, true); var bundleDirPath = Path.Combine(tempDirPath, BundleName); var contentsDirPath = Path.Combine(bundleDirPath, "Contents");