소스 검색

Fix new test

Cody Robibero 3 년 전
부모
커밋
a04f8f5efb
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Emby.Server.Implementations/Library/PathExtensions.cs

+ 2 - 1
Emby.Server.Implementations/Library/PathExtensions.cs

@@ -40,7 +40,8 @@ namespace Emby.Server.Implementations.Library
                     && str[attributeEnd] == '=')
                 {
                     var closingIndex = str[attributeEnd..].IndexOf(']');
-                    if (closingIndex != -1)
+                    // Must be at least 1 character before the closing bracket.
+                    if (closingIndex > 1)
                     {
                         return str[(attributeEnd + 1)..(attributeEnd + closingIndex)].Trim().ToString();
                     }