소스 검색

Update ApplicationHost.cs

BaronGreenback 4 년 전
부모
커밋
60e8f47194
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Emby.Server.Implementations/ApplicationHost.cs

+ 3 - 3
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
                 {