Skip to content

Commit c70ebfa

Browse files
committed
Create the user map directory if required.
Fixes OpenRA#8772.
1 parent ded5a2b commit c70ebfa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OpenRA.Mods.Common/Widgets/Logic/Editor/SaveMapLogic.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ public SaveMapLogic(Widget widget, Action<string> onSave, Action onExit, Map map
134134

135135
map.RequiresMod = Game.ModData.Manifest.Mod.Id;
136136

137+
// Create the map directory if required
138+
Directory.CreateDirectory(Platform.ResolvePath(directoryDropdown.Text));
139+
137140
var combinedPath = Platform.ResolvePath(Path.Combine(directoryDropdown.Text, filename.Text + fileTypes[typeDropdown.Text]));
138141

139142
// Invalidate the old map metadata

0 commit comments

Comments
 (0)