diff options
Diffstat (limited to 'mcs/class/corlib/System.IO')
-rw-r--r-- | mcs/class/corlib/System.IO/Path.cs | 3 | ||||
-rw-r--r-- | mcs/class/corlib/System.IO/Stream.cs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs index 3eeb79195b..a1a6d12130 100644 --- a/mcs/class/corlib/System.IO/Path.cs +++ b/mcs/class/corlib/System.IO/Path.cs @@ -289,9 +289,8 @@ namespace System.IO { return fullpath; } - [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx - // http://www.codeproject.com/Tips/223321/Win32-API-GetFullPathName + [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern int GetFullPathName(string path, int numBufferChars, StringBuilder buffer, ref IntPtr lpFilePartOrNull); internal static string GetFullPathName(string path) diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs index fecea2d8b7..d718e1fb05 100644 --- a/mcs/class/corlib/System.IO/Stream.cs +++ b/mcs/class/corlib/System.IO/Stream.cs @@ -303,7 +303,7 @@ namespace System.IO async Task CopyToAsync (Stream destination, byte[] buffer, CancellationToken cancellationToken) { int nread; - while ((nread = await ReadAsync (buffer, 0, buffer.Length).ConfigureAwait (false)) != 0) + while ((nread = await ReadAsync (buffer, 0, buffer.Length, cancellationToken).ConfigureAwait (false)) != 0) await destination.WriteAsync (buffer, 0, nread, cancellationToken).ConfigureAwait (false); } |