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:
Jan Henning 2016-04-18 21:31:17 +02:00
parent e1bdab8fe7
commit 22714614cb

View File

@ -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");