Skip to content

Commit

Permalink
Fix for a bug introduced by commit a5f9e0a that doesn't report the la…
Browse files Browse the repository at this point in the history
…st remaining transferred bytes.
  • Loading branch information
sstevenkang committed Jul 28, 2017
1 parent 7d43da4 commit d2f420e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sdk/src/Services/S3/Custom/Model/GetObjectResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public void WriteResponseStreamToFile(string filePath, bool append)

// Encrypted objects may have size smaller than the total amount of data transfered due to padding.
// Instead of changing the file size or the total downloaded size, pass a flag that indicate that the transfer is complete.
this.OnRaiseProgressEvent(filePath, 0, current, this.ContentLength, completed:true);
this.OnRaiseProgressEvent(filePath, totalIncrementTransferred, current, this.ContentLength, completed:true);
}
}

Expand Down Expand Up @@ -625,7 +625,7 @@ await downloadStream.WriteAsync(buffer, 0, bytesRead)

// Encrypted objects may have size smaller than the total amount of data trasnfered due to padding.
// Instead of changing the file size or the total downloaded size, pass a flag that indicate that the transfer is complete.
this.OnRaiseProgressEvent(filePath, 0, current, this.ContentLength, completed:true);
this.OnRaiseProgressEvent(filePath, totalIncrementTransferred, current, this.ContentLength, completed:true);
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public partial class GetObjectResponse

// Encrypted objects may have size smaller than the total amount of data transfered due to padding.
// Instead of changing the file size or the total downloaded size, pass a flag that indicate that the transfer is complete.
this.OnRaiseProgressEvent(filePath, 0, current, this.ContentLength, completed:true);
this.OnRaiseProgressEvent(filePath, totalIncrementTransferred, current, this.ContentLength, completed:true);
}
}

Expand Down

0 comments on commit d2f420e

Please sign in to comment.