diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-09-24 19:41:36 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-09-24 19:41:36 -0400 |
commit | 4eff88fe73760ef89423de76cae80ffeee235240 (patch) | |
tree | b4cf81eda49be01a8ab148ae81861e563afc01fd /src/SMAPI/Framework/ContentPack.cs | |
parent | 9edd3b901a110ef1fddcbcc05730da1b1cadd680 (diff) | |
download | SMAPI-4eff88fe73760ef89423de76cae80ffeee235240.tar.gz SMAPI-4eff88fe73760ef89423de76cae80ffeee235240.tar.bz2 SMAPI-4eff88fe73760ef89423de76cae80ffeee235240.zip |
fix error in case-insensitive content pack code when mod passes in a null path
Diffstat (limited to 'src/SMAPI/Framework/ContentPack.cs')
-rw-r--r-- | src/SMAPI/Framework/ContentPack.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ContentPack.cs b/src/SMAPI/Framework/ContentPack.cs index 161fdbe4..a6835dbe 100644 --- a/src/SMAPI/Framework/ContentPack.cs +++ b/src/SMAPI/Framework/ContentPack.cs @@ -119,7 +119,7 @@ namespace StardewModdingAPI.Framework if (!PathUtilities.IsSafeRelativePath(relativePath)) throw new InvalidOperationException($"You must call {nameof(IContentPack)} methods with a relative path."); - return this.RelativePaths.TryGetValue(relativePath, out string caseInsensitivePath) + return !string.IsNullOrWhiteSpace(relativePath) && this.RelativePaths.TryGetValue(relativePath, out string caseInsensitivePath) ? caseInsensitivePath : relativePath; } |