Use File.GetAttributes instead of creating a new FileInfo

This commit is contained in:
cvium 2021-09-11 13:32:59 +02:00
parent 3bc9f38833
commit 794b73c62d

View File

@ -140,10 +140,6 @@ namespace Jellyfin.Server.Infrastructure
.ConfigureAwait(true); .ConfigureAwait(true);
} }
private static bool IsSymLink(string path) private static bool IsSymLink(string path) => (File.GetAttributes(path) & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
{
var fileInfo = new FileInfo(path);
return (fileInfo.Attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
}
} }
} }