summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r--src/StardewModdingAPI/Program.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 7de22ee9..c3bd1646 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -323,8 +323,10 @@ namespace StardewModdingAPI
// load mods
foreach (string directory in Directory.GetDirectories(Program.ModPath))
{
+ string directoryName = new DirectoryInfo(directory).Name;
+
// ignore internal directory
- if (new DirectoryInfo(directory).Name == ".cache")
+ if (directoryName == ".cache")
continue;
// check for cancellation
@@ -341,7 +343,7 @@ namespace StardewModdingAPI
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);
+ Program.Monitor.Log($"Ignored folder \"{directoryName}\" which doesn't have a manifest.json.", LogLevel.Warn);
continue;
}
string errorPrefix = $"Couldn't load mod for manifest '{manifestPath}'";