From 61de2a2312a4ef1b47c6bbe50d9c4f0e661af4b5 Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sun, 8 Feb 2015 12:55:45 +1300 Subject: [PATCH] Fix map importer using the map title as the output filename. This is broken because the map title can make an invalid filename. --- .../UtilityCommands/ImportLegacyMapCommand.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/UtilityCommands/ImportLegacyMapCommand.cs b/OpenRA.Mods.Common/UtilityCommands/ImportLegacyMapCommand.cs index f564750c30..cb680c057e 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ImportLegacyMapCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ImportLegacyMapCommand.cs @@ -9,9 +9,7 @@ #endregion using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.IO; namespace OpenRA.Mods.Common.UtilityCommands { @@ -27,7 +25,7 @@ namespace OpenRA.Mods.Common.UtilityCommands var rules = Game.ModData.RulesetCache.LoadDefaultRules(); var map = LegacyMapImporter.Import(args[1], modData.Manifest.Mod.Id, rules, e => Console.WriteLine(e)); - var dest = map.Title + ".oramap"; + var dest = Path.ChangeExtension(args[1], "oramap"); map.Save(dest); Console.WriteLine(dest + " saved."); }