From 794b73c62d7f9e5a962dc6031e7772c1a644aae9 Mon Sep 17 00:00:00 2001 From: cvium Date: Sat, 11 Sep 2021 13:32:59 +0200 Subject: [PATCH] Use File.GetAttributes instead of creating a new FileInfo --- .../SymlinkFollowingPhysicalFileResultExecutor.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs b/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs index 401b3bb84..93bd2c1ba 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; } }