Skip to content

Commit

Permalink
Specify comparer when search resource name
Browse files Browse the repository at this point in the history
  • Loading branch information
atifaziz authored and kzu committed Jan 30, 2024
1 parent b4545c6 commit 9d4fd28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EmbeddedResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static Stream GetStream(string relativePath)
.Replace('\\', '.');

var manifestResourceName = Assembly.GetExecutingAssembly()
.GetManifestResourceNames().FirstOrDefault(x => x.EndsWith(resourceName));
.GetManifestResourceNames().FirstOrDefault(x => x.EndsWith(resourceName, StringComparison.Ordinal));

if (string.IsNullOrEmpty(manifestResourceName))
throw new InvalidOperationException($"Did not find required resource ending in '{resourceName}' in assembly '{baseName}'.");
Expand Down

0 comments on commit 9d4fd28

Please sign in to comment.