diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-09-08 17:52:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-08 17:52:08 +0100 |
| commit | 60e8f47194d0bc7053e5771cd355b1ef628f99a2 (patch) | |
| tree | 7a7e13918af95acafb4bf733b8dc822321ed4b95 /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | ddfb13f94550b6df7cbe7d6aeb17ab91d4bb2b54 (diff) | |
Update ApplicationHost.cs
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 6 |
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 { |
