From c70ebfab74c337eef0b93c8ac908b7bb35304f99 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 25 Jul 2015 09:36:29 +0100 Subject: [PATCH] Create the user map directory if required. Fixes #8772. --- OpenRA.Mods.Common/Widgets/Logic/Editor/SaveMapLogic.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/SaveMapLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/SaveMapLogic.cs index 399611c5e8..e726e3335c 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/SaveMapLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/SaveMapLogic.cs @@ -134,6 +134,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic map.RequiresMod = Game.ModData.Manifest.Mod.Id; + // Create the map directory if required + Directory.CreateDirectory(Platform.ResolvePath(directoryDropdown.Text)); + var combinedPath = Platform.ResolvePath(Path.Combine(directoryDropdown.Text, filename.Text + fileTypes[typeDropdown.Text])); // Invalidate the old map metadata