mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #6541] [MERGED] Read file length for symlinks, #11015
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/6541
Author: @cvium
Created: 9/11/2021
Status: ✅ Merged
Merged: 9/20/2021
Merged by: @Bond-009
Base:
master← Head:symlink_workaround📝 Commits (8)
6a2df35Read file length for symlinks, supersedes #5775 and Recording m3u Live TV broken in 10.9.2 (not the access denied error) (#5824)30152c8Include the MIT license3bc9f38Fix SA1614 and SA1116794b73cUse File.GetAttributes instead of creating a new FileInfoe34aa22Remove AsyncFile.OpenRead6b8b7f1Update Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cscec0dd9Update Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs62113c4Update Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs📊 Changes
2 files changed (+151 additions, -0 deletions)
View changed files
➕
Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs(+145 -0)📝
Jellyfin.Server/Startup.cs(+6 -0)📄 Description
Changes
Created a subclass of
PhysicalFileResultExecutorand replaced it in the DI container. It unfortunately reads the file attributes 1-2 times more than its superclass, butFileInfois called multiple times even outsidePhysicalFileResultExecutor. Therefore I have copied parts of static extensions methods eg. https://github.com/dotnet/aspnetcore/blob/main/src/Http/Http/src/SendFileFallback.cs to get the desired result.The new executor is only used for symlinks.
Supersedes #5775 and #5824. And a huge thanks for the research done by both PR authors.
Issues
Fixes https://github.com/jellyfin/jellyfin/issues/5521
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.