summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-12-06 17:29:38 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-12-06 17:29:38 -0500
commitb751e7dd2e1abeeb2adbbb099f1473ca10092c88 (patch)
tree8e1450b0be35a215905360dd11da6afc9c30649b /src/StardewModdingAPI
parent748e45aefbfc4d8e15519a71052d48f25d1c6da9 (diff)
downloadSMAPI-b751e7dd2e1abeeb2adbbb099f1473ca10092c88.tar.gz
SMAPI-b751e7dd2e1abeeb2adbbb099f1473ca10092c88.tar.bz2
SMAPI-b751e7dd2e1abeeb2adbbb099f1473ca10092c88.zip
skip mod folder with a warning if it has no manifest (#186)
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Program.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index a46f7a3e..62b9dabd 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -327,7 +327,14 @@ namespace StardewModdingAPI
// get manifest path
string manifestPath = Path.Combine(directory, "manifest.json");
+ if (!File.Exists(manifestPath))
+ {
+ Program.Monitor.Log($"Ignored folder \"{new DirectoryInfo(directory).Name}\" which doesn't have a manifest.json.", LogLevel.Warn);
+ continue;
+ }
string errorPrefix = $"Couldn't load mod for manifest '{manifestPath}'";
+
+ // read manifest
Manifest manifest;
try
{