diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-12-06 17:29:38 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-12-06 17:29:38 -0500 |
commit | b751e7dd2e1abeeb2adbbb099f1473ca10092c88 (patch) | |
tree | 8e1450b0be35a215905360dd11da6afc9c30649b /src/StardewModdingAPI | |
parent | 748e45aefbfc4d8e15519a71052d48f25d1c6da9 (diff) | |
download | SMAPI-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.cs | 7 |
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 { |