aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Updates
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Updates')
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index c8a2d98bf4..110c388fbe 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -32,6 +32,8 @@ namespace Emby.Server.Implementations.Updates
/// </summary>
public class InstallationManager : IInstallationManager
{
+ private static readonly char[] InvlidPackageNameChars = [.. Path.GetInvalidFileNameChars(), '/', '\\'];
+
/// <summary>
/// The logger.
/// </summary>
@@ -602,12 +604,7 @@ namespace Emby.Server.Implementations.Updates
return false;
}
- if (name.Contains('/', StringComparison.Ordinal) || name.Contains('\\', StringComparison.Ordinal))
- {
- return false;
- }
-
- if (name.AsSpan().IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
+ if (name.AsSpan().IndexOfAny(InvlidPackageNameChars) >= 0)
{
return false;
}