diff options
| author | crobibero <cody@robibe.ro> | 2020-07-29 09:28:53 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-07-29 09:28:53 -0600 |
| commit | 03f15fc0eff3a8937e2c710781016eab9e6b9776 (patch) | |
| tree | 643b94d335a0a32e85bd1ece562178cca6a5e05d /Jellyfin.Api/Helpers/ProgressiveFileCopier.cs | |
| parent | b8d327889b96b820249ddf80ee023b189f67f4a3 (diff) | |
use proper os comparison
Diffstat (limited to 'Jellyfin.Api/Helpers/ProgressiveFileCopier.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/ProgressiveFileCopier.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs b/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs index acaccc77a..d8b1828f5 100644 --- a/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs +++ b/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs @@ -1,5 +1,7 @@ using System; +using System.Buffers; using System.IO; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Models.PlaybackDtos; @@ -82,7 +84,7 @@ namespace Jellyfin.Api.Helpers var allowAsyncFileRead = false; // use non-async filestream along with read due to https://github.com/dotnet/corefx/issues/6039 - if (Environment.OSVersion.Platform != PlatformID.Win32NT) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { fileOptions |= FileOptions.Asynchronous; allowAsyncFileRead = true; |
