diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-08-16 22:03:21 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-08-16 22:03:21 -0400 |
commit | 5ab87efaa07a0972fd59c88c8aab456a6133329d (patch) | |
tree | 54e5df289dbffa06a06ff69a9958f7bda3343e4f /src/SMAPI | |
parent | 4d9384b8288fa5dcd36a9c8cbd66574a2896605f (diff) | |
download | SMAPI-5ab87efaa07a0972fd59c88c8aab456a6133329d.tar.gz SMAPI-5ab87efaa07a0972fd59c88c8aab456a6133329d.tar.bz2 SMAPI-5ab87efaa07a0972fd59c88c8aab456a6133329d.zip |
log error if mod files are detected directly under Mods folder
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index cbb559c1..0f86ed6b 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -405,7 +405,14 @@ namespace StardewModdingAPI.Framework { string[] looseFiles = new DirectoryInfo(this.ModsPath).GetFiles().Select(p => p.Name).ToArray(); if (looseFiles.Any()) + { + if (looseFiles.Any(name => name.Equals("manifest.json", StringComparison.OrdinalIgnoreCase) || name.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))) + { + this.Monitor.Log($"Detected mod files directly inside the '{Path.GetFileName(this.ModsPath)}' folder. These will be ignored. Each mod must have its own subfolder instead.", LogLevel.Error); + } + this.Monitor.Log($" Ignored loose files: {string.Join(", ", looseFiles.OrderBy(p => p, StringComparer.OrdinalIgnoreCase))}"); + } } // load manifests |