From 38304bc57b7d02e863ad47ad88bc740233dfc436 Mon Sep 17 00:00:00 2001 From: Taryn Hill Date: Fri, 17 Feb 2017 08:03:09 -0600 Subject: [PATCH] Throw an InvalidOperationException when a mod manifest references a bogus package Bogus packages are packages that: * Cannot be located on disk * Are of an unsupported format --- OpenRA.Game/FileSystem/FileSystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Game/FileSystem/FileSystem.cs b/OpenRA.Game/FileSystem/FileSystem.cs index 7a08541d30..0fd6d19710 100644 --- a/OpenRA.Game/FileSystem/FileSystem.cs +++ b/OpenRA.Game/FileSystem/FileSystem.cs @@ -121,7 +121,11 @@ namespace OpenRA.FileSystem modPackages.Add(package); } else + { package = OpenPackage(name); + if (package == null) + throw new InvalidOperationException("Could not open package '{0}', file not found or its format is not supported.".F(name)); + } Mount(package, explicitName); }