aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index a6b6505bf..1bc436820 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -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
{