Fix a compiler warning in MapCommand.cs

This commit is contained in:
abcdefg30
2023-11-26 22:47:01 +01:00
committed by Gustas
parent 6b0db6699d
commit 855568cab7

View File

@@ -76,13 +76,10 @@ namespace OpenRA.Mods.Common.UtilityCommands
map.Save(new Folder(z.Name.Replace(".oramap", ""))); map.Save(new Folder(z.Name.Replace(".oramap", "")));
break; break;
case "repack": case "repack":
if (mapPackage is Folder f) if (mapPackage is Folder f && File.Exists(f.Name + ".oramap"))
{ {
if (File.Exists(f.Name + ".oramap")) map.Save(ZipFileLoader.Create(f.Name + ".oramap"));
{ Directory.Delete(f.Name, true);
map.Save(ZipFileLoader.Create(f.Name + ".oramap"));
Directory.Delete(f.Name, true);
}
} }
break; break;