diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-09-25 20:34:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-25 20:34:21 +0200 |
| commit | c5491dc46cc4c9b52017bcfd3efb89b15629ee3c (patch) | |
| tree | a421adf542c13dd24bed74b2cc2b53d8fcb185fb /Jellyfin.Server | |
| parent | b37829dfbfc5d5a2b9deb4a662979e0f4910a8bd (diff) | |
| parent | a4eede29abf1cf380c959835e59b7062ead1a654 (diff) | |
Merge pull request #6613 from Bond-009/randomaccess
Diffstat (limited to 'Jellyfin.Server')
| -rw-r--r-- | Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs b/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs index f3fbab77e..be4926da6 100644 --- a/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs +++ b/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs @@ -55,8 +55,8 @@ namespace Jellyfin.Server.Infrastructure // This may or may not be fixed in .NET 6, but looks like it will not https://github.com/dotnet/aspnetcore/issues/34371 if ((fileInfo.Attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint) { - using Stream thisFileStream = File.OpenRead(path); - length = thisFileStream.Length; + using var fileHandle = File.OpenHandle(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + length = RandomAccess.GetLength(fileHandle); } return new FileMetadata |
