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 committed Jan 7, 2024
1 parent 65f0469 commit ceb1eb0
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 @@ -35,7 +35,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 ceb1eb0

Please sign in to comment.