summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r--src/SMAPI/Framework/ModLoading/ModResolver.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs
index d0ef1b08..9802d9e9 100644
--- a/src/SMAPI/Framework/ModLoading/ModResolver.cs
+++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs
@@ -142,6 +142,18 @@ namespace StardewModdingAPI.Framework.ModLoading
continue;
}
+ // validate DLL value
+ if (string.IsNullOrWhiteSpace(mod.Manifest.EntryDll))
+ {
+ mod.SetStatus(ModMetadataStatus.Failed, "its manifest has no EntryDLL field.");
+ continue;
+ }
+ if (mod.Manifest.EntryDll.Intersect(Path.GetInvalidFileNameChars()).Any())
+ {
+ mod.SetStatus(ModMetadataStatus.Failed, $"its manifest has invalid filename '{mod.Manifest.EntryDll}' for the EntryDLL field.");
+ continue;
+ }
+
// validate DLL path
string assemblyPath = Path.Combine(mod.DirectoryPath, mod.Manifest.EntryDll);
if (!File.Exists(assemblyPath))