From 1974324c43b093a360507546e8be12ad594b56f2 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 16 Apr 2022 13:41:37 -0400 Subject: make EntryDll manifest field case-insensitive --- src/SMAPI/Framework/ContentCoordinator.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/SMAPI/Framework/ContentCoordinator.cs') diff --git a/src/SMAPI/Framework/ContentCoordinator.cs b/src/SMAPI/Framework/ContentCoordinator.cs index 92452224..f83d4090 100644 --- a/src/SMAPI/Framework/ContentCoordinator.cs +++ b/src/SMAPI/Framework/ContentCoordinator.cs @@ -80,9 +80,6 @@ namespace StardewModdingAPI.Framework /// The cached asset load/edit operations to apply, indexed by asset name. private readonly TickCacheDictionary AssetOperationsByKey = new(); - /// The previously created case-insensitive path caches by root path. - private readonly Dictionary CaseInsensitivePathCaches = new(StringComparer.OrdinalIgnoreCase); - /********* ** Accessors @@ -211,7 +208,7 @@ namespace StardewModdingAPI.Framework jsonHelper: this.JsonHelper, onDisposing: this.OnDisposing, aggressiveMemoryOptimizations: this.AggressiveMemoryOptimizations, - relativePathCache: this.GetCaseInsensitivePathCache(rootDirectory) + relativePathCache: CaseInsensitivePathCache.GetFor(rootDirectory) ); this.ContentManagers.Add(manager); return manager; @@ -486,18 +483,6 @@ namespace StardewModdingAPI.Framework }); } - /// Get a dictionary of relative paths within a root path, for case-insensitive file lookups. - /// The root path to scan. - public CaseInsensitivePathCache GetCaseInsensitivePathCache(string rootPath) - { - rootPath = PathUtilities.NormalizePath(rootPath); - - if (!this.CaseInsensitivePathCaches.TryGetValue(rootPath, out CaseInsensitivePathCache? cache)) - this.CaseInsensitivePathCaches[rootPath] = cache = new CaseInsensitivePathCache(rootPath); - - return cache; - } - /// Get the tilesheet ID order used by the unmodified version of a map asset. /// The asset path relative to the loader root directory, not including the .xnb extension. public TilesheetReference[] GetVanillaTilesheetIds(string assetName) -- cgit