From 5000369463eec716dcee812b5a6c712189657a6f Mon Sep 17 00:00:00 2001 From: James Date: Thu, 8 Oct 2015 23:03:40 +0100 Subject: [PATCH] Fixed TFD Not Creating Install Directory --- OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs | 1 + .../Widgets/Logic/Installation/InstallFromCDLogic.cs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs b/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs index 8f7ecc044a..3fc74d0d04 100644 --- a/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs +++ b/OpenRA.Game/FileSystem/InstallShieldCABExtractor.cs @@ -443,6 +443,7 @@ namespace OpenRA.FileSystem public void ExtractFile(uint index, string fileName) { + Directory.CreateDirectory(Path.GetDirectoryName(fileName)); using (var destfile = File.Open(fileName, FileMode.Create)) GetContentById(index, destfile); } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs index 1fcee2378b..960e4ce140 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs @@ -137,7 +137,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic } } - afterInstall(); + Game.RunAfterTick(() => + { + Ui.CloseWindow(); + afterInstall(); + }); }) { IsBackground = true }.Start(); }