diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-09-18 21:03:05 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-09-18 21:03:05 -0400 |
commit | f56636d2c8c78d06b150c4f942f2b791228c560b (patch) | |
tree | ffea18084b17321fe1cbd42fc3dddf7072867032 /src | |
parent | 49756e654204ba0e66a1b75f459462e0cd83639b (diff) | |
download | SMAPI-f56636d2c8c78d06b150c4f942f2b791228c560b.tar.gz SMAPI-f56636d2c8c78d06b150c4f942f2b791228c560b.tar.bz2 SMAPI-f56636d2c8c78d06b150c4f942f2b791228c560b.zip |
fix trace logs not showing path for invalid mods
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 14380f7b..d05f5bb9 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -837,7 +837,7 @@ namespace StardewModdingAPI.Framework // unlock mod integrations this.ModRegistry.AreAllModsInitialised = true; } - + /// <summary>Load a given mod.</summary> /// <param name="mod">The mod to load.</param> /// <param name="mods">The mods being loaded.</param> @@ -855,13 +855,14 @@ namespace StardewModdingAPI.Framework errorDetails = null; // log entry - if (mod.IsContentPack) - this.Monitor.Log($" {mod.DisplayName} (content pack, {PathUtilities.GetRelativePath(this.ModsPath, mod.DirectoryPath)})...", LogLevel.Trace); - else { - this.Monitor.Log(mod.Manifest?.EntryDll != null - ? $" {mod.DisplayName} ({PathUtilities.GetRelativePath(this.ModsPath, mod.DirectoryPath)}{Path.DirectorySeparatorChar}{mod.Manifest.EntryDll})..." // don't use Path.Combine here, since EntryDLL might not be valid - : $" {mod.DisplayName}...", LogLevel.Trace); + string relativePath = PathUtilities.GetRelativePath(this.ModsPath, mod.DirectoryPath); + if (mod.IsContentPack) + this.Monitor.Log($" {mod.DisplayName} ({relativePath}) [content pack]...", LogLevel.Trace); + else if (mod.Manifest.EntryDll != null) + this.Monitor.Log($" {mod.DisplayName} ({relativePath}{Path.DirectorySeparatorChar}{mod.Manifest.EntryDll})...", LogLevel.Trace); // don't use Path.Combine here, since EntryDLL might not be valid + else + this.Monitor.Log($" {mod.DisplayName} ({relativePath})...", LogLevel.Trace); } // add warning for missing update key |