Update ApplicationHost.cs

This commit is contained in:
BaronGreenback 2020-09-08 17:52:08 +01:00 committed by GitHub
parent ddfb13f945
commit 60e8f47194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1049,11 +1049,11 @@ namespace Emby.Server.Implementations
foreach (var dir in directories)
{
int p = dir.LastIndexOf('_');
if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver))
int underscoreIndex = dir.LastIndexOf('_');
if (underscoreIndex != -1 && Version.TryParse(dir.Substring(underscoreIndex + 1), out Version ver))
{
// Versioned folder.
versions.Add((ver, dir.Substring(0, p), dir));
versions.Add((ver, dir.Substring(0, underscoreIndex), dir));
}
else
{