summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-02-02 20:47:54 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-02-02 20:48:29 -0500
commitae7d9d6bc484bd27922e6652d116ce7ddd4b8104 (patch)
tree3b21eca2824ff16b5eff6b0a543eeca210ee5978
parent8c6dca95dae1878610c4cdf18a2f98578e3c577e (diff)
downloadSMAPI-ae7d9d6bc484bd27922e6652d116ce7ddd4b8104.tar.gz
SMAPI-ae7d9d6bc484bd27922e6652d116ce7ddd4b8104.tar.bz2
SMAPI-ae7d9d6bc484bd27922e6652d116ce7ddd4b8104.zip
fix error when SMAPI tries to load Mac metadata files for DLLs
-rw-r--r--release-notes.md3
-rw-r--r--src/StardewModdingAPI/Program.cs3
2 files changed, 6 insertions, 0 deletions
diff --git a/release-notes.md b/release-notes.md
index 2ef8b332..0c6b8a89 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -3,6 +3,9 @@
## 1.8
See [log](https://github.com/Pathoschild/SMAPI/compare/1.7...1.8).
+* For players:
+ * Fixed a rare issue where loading mods failed due to hidden metadata files on Mac.
+
* For mod developers:
* You can now create a `SemanticVersion` from a version string.
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index ec3ccce7..08b5c636 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -464,6 +464,9 @@ namespace StardewModdingAPI
bool succeeded = true;
foreach (string assemblyPath in Directory.GetFiles(directory, "*.dll"))
{
+ if (Path.GetFileName(assemblyPath).StartsWith("."))
+ continue; // skip hidden files (e.g. Mac sometimes copies with "._" prefix).
+
try
{
processedAssemblies.Add(modAssemblyLoader.ProcessAssemblyUnlessCached(assemblyPath));