mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 15:48:03 +00:00
Merge pull request #15468 from Bond-009/carefulWithLastMinChanges
Check if target exists before trying to follow it
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user