From d01e8f19c46eb29ec9dc68fac76e2c9780cedb10 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Fri, 8 Jun 2018 11:21:43 +0200 Subject: [PATCH] Fixed an issue after the merge conflict ... --- Duplicati/Library/Utility/Utility.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Duplicati/Library/Utility/Utility.cs b/Duplicati/Library/Utility/Utility.cs index c9100b595..7372f0c39 100644 --- a/Duplicati/Library/Utility/Utility.cs +++ b/Duplicati/Library/Utility/Utility.cs @@ -65,9 +65,9 @@ namespace Duplicati.Library.Utility /// /// The stream to read from /// The stream to write to - public static void CopyStream(Stream source, Stream target) + public static long CopyStream(Stream source, Stream target) { - CopyStream(source, target, true); + return CopyStream(source, target, true); } /// @@ -77,7 +77,7 @@ namespace Duplicati.Library.Utility /// The stream to write to /// True if an attempt should be made to rewind the source stream, false otherwise /// Temporary buffer to use (optional) - public static void CopyStream(Stream source, Stream target, bool tryRewindSource, byte[] buf = null) + public static long CopyStream(Stream source, Stream target, bool tryRewindSource, byte[] buf = null) { if (tryRewindSource && source.CanSeek) try { source.Position = 0; } @@ -95,6 +95,8 @@ namespace Duplicati.Library.Utility target.Write(buf, 0, read); total += read; } + + return total; } ///