Skip to content

The Free Software Media System - Server Backend & API

Backport pull request #15468 from jellyfin/release-10.11.z

Bond-00999c68ddd5035
diff --git a/MediaBrowser.Controller/IO/FileSystemHelper.cs b/MediaBrowser.Controller/IO/FileSystemHelper.cs
index 324aea7e3b..3e390ca428 100644
--- a/MediaBrowser.Controller/IO/FileSystemHelper.cs
+++ b/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)