mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1218317 - Retrieve the file size for finished downloads. r=margaret
MozReview-Commit-ID: 2TbC3rs0RyH --HG-- extra : transplant_source : %F2%09%F6e%0D%8BX%CCl%5BU%95%FDzP%A9%92%FC%27%96
This commit is contained in:
parent
e1bdab8fe7
commit
22714614cb
@ -330,7 +330,9 @@ DownloadItem.prototype = {
|
||||
},
|
||||
|
||||
get size() {
|
||||
if (this.download.hasProgress) {
|
||||
if (this.download.succeeded && this.download.target.exists) {
|
||||
return DownloadUtils.convertByteUnits(this.download.target.size).join("");
|
||||
} else if (this.download.hasProgress) {
|
||||
return DownloadUtils.convertByteUnits(this.download.totalBytes).join("");
|
||||
}
|
||||
return strings.GetStringFromName("downloadState.unknownSize");
|
||||
|
Loading…
Reference in New Issue
Block a user