Skip to content

Commit 849f9cd

Browse files
authored
[storage] fix issue 17743 (#17788)
1 parent 8e808d6 commit 849f9cd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed the issue that upload blob might fail on Linux [#17743]
22+
- `Set-AzStorageBlobContent`
2123

2224
## Version 4.4.1
2325
* Fixed get blob by tag failure on Powershell 7.2.2

src/Storage/Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ internal virtual async Task UploadBlobwithSdk(long taskId, IStorageBlobManagemen
461461
if (pr != null)
462462
{
463463
// Size of the source file might be 0, when it is, directly treat the progress as 100 percent.
464-
pr.PercentComplete = 0 == fileSize ? 100 : (int)(finishedBytes * 100 / fileSize);
464+
pr.PercentComplete = 0 == fileSize ? 100 : (int)(finishedBytes * 100 / fileSize % 101);
465465
pr.StatusDescription = string.Format(CultureInfo.CurrentCulture, Resources.FileTransmitStatus, pr.PercentComplete);
466466
this.OutputStream.WriteProgress(pr);
467467
}

0 commit comments

Comments
 (0)