Skip to content

[Storage]Fixed the issue that output number in console when update/copy blob sometimes [#16783] #16788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Storage/Storage.Management/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed the issue that output number in console when update/copy blob sometimes [#16783]
- `Set-AzStorageBlobContent`
- `Copy-AzStorageBlob`

## Version 4.1.1
* Fixed the failure of sync copy blob with long destination blob name [#16628]
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Storage/Blob/Cmdlet/CopyAzureStorageBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ private async Task CopyFromUri(long taskId, IStorageBlobManagement destChannel,
// Size of the source file might be 0, when it is, directly treat the progress as 100 percent.
pr.PercentComplete = 0 == srcProperties.ContentLength ? 100 : (int)(finishedBytes * 100 / srcProperties.ContentLength);
pr.StatusDescription = string.Format("Percent: {0}%.", pr.PercentComplete);
Console.WriteLine(finishedBytes);
this.OutputStream.WriteProgress(pr);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ internal virtual async Task UploadBlobwithSdk(long taskId, IStorageBlobManagemen
// Size of the source file might be 0, when it is, directly treat the progress as 100 percent.
pr.PercentComplete = 0 == fileSize ? 100 : (int)(finishedBytes * 100 / fileSize);
pr.StatusDescription = string.Format(CultureInfo.CurrentCulture, Resources.FileTransmitStatus, pr.PercentComplete);
Console.WriteLine(finishedBytes);
this.OutputStream.WriteProgress(pr);
}
});
Expand Down