From 0523c2115da2b35d7f6ce028f4b128b25354078c Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 7 Mar 2019 14:28:21 -0800 Subject: [PATCH] Add missing CopyToAsync override in FileStream.Unix.cs (#23101) --- src/System.Private.CoreLib/shared/System/IO/FileStream.Unix.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/System.Private.CoreLib/shared/System/IO/FileStream.Unix.cs b/src/System.Private.CoreLib/shared/System/IO/FileStream.Unix.cs index 55f30b5..6bbd037 100644 --- a/src/System.Private.CoreLib/shared/System/IO/FileStream.Unix.cs +++ b/src/System.Private.CoreLib/shared/System/IO/FileStream.Unix.cs @@ -735,6 +735,11 @@ namespace System.IO }, this, CancellationToken.None, TaskContinuationOptions.DenyChildAttach, TaskScheduler.Default)); } + public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) => + // Windows version overrides this method, so the Unix version does as well, but it doesn't + // currently have any special optimizations to be done and so just calls to the base. + base.CopyToAsync(destination, bufferSize, cancellationToken); + /// Sets the current position of this stream to the given value. /// The point relative to origin from which to begin seeking. /// -- 2.7.4