diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-12-09 08:38:00 -0700 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2021-12-09 08:38:00 -0700 |
| commit | eeb8192602627e912b491f3e7e6696ce415f3ce3 (patch) | |
| tree | 1c010990da3822b4229a9afc1b56ab6550f2f095 | |
| parent | 593b2fd359de378a2588a8d54d11ebc0bb2cd3f1 (diff) | |
Add StringComparison
| -rw-r--r-- | Emby.Server.Implementations/Library/PathExtensions.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/PathExtensions.cs b/Emby.Server.Implementations/Library/PathExtensions.cs index 78850c149..3fcbb4d65 100644 --- a/Emby.Server.Implementations/Library/PathExtensions.cs +++ b/Emby.Server.Implementations/Library/PathExtensions.cs @@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Library throw new ArgumentException("String can't be empty.", nameof(attribute)); } - var attributeIndex = str.IndexOf(attribute); + var attributeIndex = str.IndexOf(attribute, StringComparison.OrdinalIgnoreCase); // Must be at least 3 characters after the attribute =, ], any character. var maxIndex = str.Length - attribute.Length - 3; @@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.Library } str = str[attributeEnd..]; - attributeIndex = str.IndexOf(attribute); + attributeIndex = str.IndexOf(attribute, StringComparison.OrdinalIgnoreCase); } // for imdbid we also accept pattern matching |
