浏览代码

Update ApplicationHost.cs

BaronGreenback 4 年之前
父节点
当前提交
92b63db569
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Emby.Server.Implementations/ApplicationHost.cs

+ 2 - 2
Emby.Server.Implementations/ApplicationHost.cs

@@ -1089,8 +1089,8 @@ namespace Emby.Server.Implementations
                         // No metafile, so lets see if the folder is versioned.
                         metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1];
                         
-                        int p = dir.LastIndexOf('_');
-                        if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver))
+                        int versionIndex = dir.LastIndexOf('_');
+                        if (versionIndex != -1 && Version.TryParse(dir.Substring(versionIndex + 1), out Version ver))
                         {
                             // Versioned folder.
                             versions.Add((ver, metafile, dir));