diff options
| author | Bond-009 <bond.009@outlook.com> | 2025-11-17 14:09:05 -0500 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2025-11-17 14:09:05 -0500 |
| commit | 99c68ddd50353b62f86067a8336c001f0592131d (patch) | |
| tree | 089eb52b4fe71b9888d3957d26cddf8734ca517b /MediaBrowser.Controller/IO/FileSystemHelper.cs | |
| parent | d7f628677e45cca6a4c34b57ff37a4d81e19277f (diff) | |
Backport pull request #15468 from jellyfin/release-10.11.z
Check if target exists before trying to follow it
Original-merge: 5878b1ffc569bc7e7204a07e77e0bb57d3984e56
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Bond_009 <bond.009@outlook.com>
Diffstat (limited to 'MediaBrowser.Controller/IO/FileSystemHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/IO/FileSystemHelper.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/IO/FileSystemHelper.cs b/MediaBrowser.Controller/IO/FileSystemHelper.cs index 324aea7e3..3e390ca42 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) |
