瀏覽代碼

Merge pull request #5409 from ikomhoog/master

Joshua M. Boniface 4 年之前
父節點
當前提交
82d88bdec6
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      CONTRIBUTORS.md
  2. 1 1
      Emby.Server.Implementations/Library/PathExtensions.cs

+ 1 - 0
CONTRIBUTORS.md

@@ -49,6 +49,7 @@
  - [h1nk](https://github.com/h1nk)
  - [hawken93](https://github.com/hawken93)
  - [HelloWorld017](https://github.com/HelloWorld017)
+ - [ikomhoog](https://github.com/ikomhoog)
  - [jftuga](https://github.com/jftuga)
  - [joern-h](https://github.com/joern-h)
  - [joshuaboniface](https://github.com/joshuaboniface)

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

@@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.Library
         {
             newPath = null;
 
-            if (path.Length == 0 || subPath.Length == 0 || newSubPath.Length == 0 || subPath.Length > path.Length)
+            if (string.IsNullOrEmpty(path) || string.IsNullOrEmpty(subPath) || string.IsNullOrEmpty(newSubPath) || subPath.Length > path.Length)
             {
                 return false;
             }