summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-03-29 12:08:56 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-03-29 12:08:56 -0400
commit3e54ac88579ba202d9bac34ca88c1dcb25f90a64 (patch)
treef769f963a8513594177401337910d932cbdc1234
parentcecd17ec3c5a46ac37caf926a74eff03d49740a1 (diff)
downloadSMAPI-3e54ac88579ba202d9bac34ca88c1dcb25f90a64.tar.gz
SMAPI-3e54ac88579ba202d9bac34ca88c1dcb25f90a64.tar.bz2
SMAPI-3e54ac88579ba202d9bac34ca88c1dcb25f90a64.zip
fix path segmenting on Linux/Mac in asset propagation
-rw-r--r--docs/release-notes.md10
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs7
2 files changed, 11 insertions, 6 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index b404f18d..78d9d8bd 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -1,6 +1,13 @@
&larr; [README](README.md)
# Release notes
+## Upcoming release
+* For the web UI:
+ * Updated the JSON validator and Content Patcher schema for Content Patcher 1.13.
+
+* For modders:
+ * Fixed asset propagation on Linux/Mac for monster sprites, NPC dialogue, and NPC schedules.
+
## 3.4.1
Released 24 March 2020 for Stardew Valley 1.4.1 or later.
@@ -8,9 +15,6 @@ Released 24 March 2020 for Stardew Valley 1.4.1 or later.
* Asset changes now propagate to NPCs in an event (e.g. wedding sprites).
* Fixed mouse input suppression not working in SMAPI 3.4.
-* For the web UI:
- * Updated the JSON validator and Content Patcher schema for Content Patcher 1.13.
-
## 3.4
Released 22 March 2020 for Stardew Valley 1.4.1 or later.
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs
index 83e553ff..30b96c1d 100644
--- a/src/SMAPI/Metadata/CoreAssetPropagator.cs
+++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs
@@ -5,6 +5,7 @@ using System.Linq;
using Microsoft.Xna.Framework.Graphics;
using Netcode;
using StardewModdingAPI.Framework.Reflection;
+using StardewModdingAPI.Toolkit.Utilities;
using StardewValley;
using StardewValley.BellsAndWhistles;
using StardewValley.Buildings;
@@ -1037,9 +1038,9 @@ namespace StardewModdingAPI.Metadata
/// <param name="path">The path to check.</param>
private string[] GetSegments(string path)
{
- if (path == null)
- return new string[0];
- return path.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+ return path != null
+ ? PathUtilities.GetSegments(path)
+ : new string[0];
}
/// <summary>Count the number of segments in a path (e.g. 'a/b' is 2).</summary>