Explorar el Código

Check if target exists before trying to follow it

Exception got caught in ManagedFileSystem and wrong file info got returned
Bond_009 hace 1 mes
padre
commit
3c3c2aee0d
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      MediaBrowser.Controller/IO/FileSystemHelper.cs

+ 5 - 0
MediaBrowser.Controller/IO/FileSystemHelper.cs

@@ -92,6 +92,11 @@ public static class FileSystemHelper
             return null;
         }
 
+        if (!targetInfo.Exists)
+        {
+            return targetInfo;
+        }
+
         var currentPath = targetInfo.FullName;
         var visited = new HashSet<string>(StringComparer.Ordinal) { linkPath, currentPath };
         while (File.ResolveLinkTarget(currentPath, returnFinalTarget: false) is FileInfo linkInfo)