Apply suggestions from code review

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
Nyanmisaka 2020-08-20 22:53:36 +08:00 committed by GitHub
parent dd3b48f203
commit 05e78ee78c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,9 +427,7 @@ namespace Jellyfin.Api.Controllers
if (fontFile != null && fileSize != null && fileSize > 0)
{
_logger.LogDebug("Fallback font size is {FileSize} Bytes", fileSize);
FileStream stream = new FileStream(fontFile.FullName, FileMode.Open, FileAccess.Read);
return File(stream, MimeTypes.GetMimeType(fontFile.FullName));
return PhysicalFile(fontFile.FullName, MimeTypes.GetMimeType(fontFile.FullName));
}
else
{