log skipped loose files

This commit is contained in:
Jesse Plamondon-Willard 2019-08-29 13:45:21 -04:00
parent 15fd868f59
commit 7ca168269f
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 10 additions and 4 deletions

View File

@ -9,9 +9,9 @@ These changes have not been released yet.
* Improved performance.
* Rewrote launch script on Linux to improve compatibility (thanks to kurumushi and toastal!).
* Improved mod scanning:
* Now ignores metadata files/folders like `__MACOSX` and `__folder_managed_by_vortex`.
* Now ignores content files like `.txt` or `.png`, which avoids missing-manifest errors in some common cases.
* Now detects XNB mods more accurately, and consolidates multi-folder XNB mods.
* Now ignores metadata files and folders (like `__MACOSX` and `__folder_managed_by_vortex`) and content files (like `.txt` or `.png`), which avoids missing-manifest errors in some common cases.
* Now detects XNB mods more accurately, and consolidates multi-folder XNB mods in logged messages.
* Added trace logs for skipped loose files so it's easier to troubleshoot player logs.
* Save Backup now works in the background, to avoid affecting startup time for players with a large number of saves.
* Duplicate-mod errors now show the mod version in each folder.
* Updated mod compatibility list.

View File

@ -25,7 +25,6 @@ using StardewModdingAPI.Framework.ModLoading;
using StardewModdingAPI.Framework.Patching;
using StardewModdingAPI.Framework.Reflection;
using StardewModdingAPI.Framework.Serialization;
using StardewModdingAPI.Internal;
using StardewModdingAPI.Patches;
using StardewModdingAPI.Toolkit;
using StardewModdingAPI.Toolkit.Framework.Clients.WebApi;
@ -395,6 +394,13 @@ namespace StardewModdingAPI.Framework
this.Monitor.Log("Loading mod metadata...", LogLevel.Trace);
ModResolver resolver = new ModResolver();
// log loose files
{
string[] looseFiles = new DirectoryInfo(this.ModsPath).GetFiles().Select(p => p.Name).ToArray();
if (looseFiles.Any())
this.Monitor.Log($" Ignored loose files: {string.Join(", ", looseFiles.OrderBy(p => p, StringComparer.InvariantCultureIgnoreCase))}", LogLevel.Trace);
}
// load manifests
IModMetadata[] mods = resolver.ReadManifests(toolkit, this.ModsPath, modDatabase).ToArray();