The Free Software Media System - Server Backend & API
Use File.GetAttributes instead of creating a new FileInfo
cvium794b73c62d7f
diff --git a/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs b/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.csindex 401b3bb841..93bd2c1ba5 100644--- a/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs+++ b/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs@@ -140,10 +140,6 @@ namespace Jellyfin.Server.Infrastructure.ConfigureAwait(true);}- private static bool IsSymLink(string path)- {- var fileInfo = new FileInfo(path);- return (fileInfo.Attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;- }+ private static bool IsSymLink(string path) => (File.GetAttributes(path) & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;}}