diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-10-06 00:40:09 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-10-06 01:04:25 +0200 |
| commit | b176beb88e22a36cc056439ac2a4df4fbe68f2c1 (patch) | |
| tree | 46988cc14ba7e8bdd9d6eb89588b1472f6caa25d /Emby.Server.Implementations/Updates/InstallationManager.cs | |
| parent | 40f7eb4e8cd9e250fb3870a4799a5a8d949e2068 (diff) | |
Reduce string allocations
Some simple changes to reduce the number of allocated strings
Diffstat (limited to 'Emby.Server.Implementations/Updates/InstallationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Updates/InstallationManager.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 6c198b6f9..77d385ba1 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -504,8 +504,7 @@ namespace Emby.Server.Implementations.Updates private async Task PerformPackageInstallation(InstallationInfo package, PluginStatus status, CancellationToken cancellationToken) { - var extension = Path.GetExtension(package.SourceUrl); - if (!string.Equals(extension, ".zip", StringComparison.OrdinalIgnoreCase)) + if (!Path.GetExtension(package.SourceUrl.AsSpan()).Equals(".zip", StringComparison.OrdinalIgnoreCase)) { _logger.LogError("Only zip packages are supported. {SourceUrl} is not a zip archive.", package.SourceUrl); return; |
