diff options
-rw-r--r-- | src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs | 7 | ||||
-rw-r--r-- | src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs | 8 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs index 9b6853b4..4aaa3f83 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs @@ -27,13 +27,6 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning /********* ** Public methods *********/ - /// <summary>Construct an instance when a mod wasn't found in a folder.</summary> - /// <param name="searchDirectory">The directory that was searched.</param> - public ModFolder(DirectoryInfo searchDirectory) - { - this.SearchDirectory = searchDirectory; - } - /// <summary>Construct an instance.</summary> /// <param name="searchDirectory">The Mods subfolder containing this mod.</param> /// <param name="actualDirectory">The folder containing manifest.json.</param> diff --git a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs index d3662c9c..de8d0f02 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs @@ -43,7 +43,7 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning // find manifest.json FileInfo manifestFile = this.FindManifest(searchFolder); if (manifestFile == null) - return new ModFolder(searchFolder); + return new ModFolder(searchFolder, null, null, "it doesn't have a manifest."); // read mod info Manifest manifest = null; @@ -53,11 +53,7 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning { manifest = this.JsonHelper.ReadJsonFile<Manifest>(manifestFile.FullName); if (manifest == null) - { - manifestError = File.Exists(manifestFile.FullName) - ? "its manifest is invalid." - : "it doesn't have a manifest."; - } + manifestError = "its manifest is invalid."; } catch (SParseException ex) { |