Merge pull request #6177 from Bond-009/async

Use async FileStreams where it makes sense
This commit is contained in:
Claus Vium 2021-09-06 13:55:34 +02:00 committed by GitHub
commit 74fef6c05b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 125 additions and 98 deletions

View file

@ -248,7 +248,7 @@ namespace Emby.Server.Implementations.IO
{
try
{
using (Stream thisFileStream = File.OpenRead(fileInfo.FullName))
using (Stream thisFileStream = new FileStream(fileInfo.FullName, FileMode.Open, FileAccess.Read, FileShare.Read, 1))
{
result.Length = thisFileStream.Length;
}