Explorar o código

Changed string.Length == 0 to string.IsNullOrEmpty in case of null

Ikomhoog %!s(int64=4) %!d(string=hai) anos
pai
achega
d4201f812c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Emby.Server.Implementations/Library/PathExtensions.cs

+ 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;
             }