Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add two decimals to content % (#645)
  • Loading branch information
joehand committed Feb 15, 2017
1 parent 028da21 commit 8461baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/download.js
Expand Up @@ -110,7 +110,7 @@ module.exports = function (type, opts, dat) {
var metaBlocksProgress = archive.metadata.blocks - archive.metadata.blocksRemaining()
var metaProgress = Math.round(metaBlocksProgress * 100 / archive.metadata.blocks)
var contentBlocksProgress = archive.content.blocks - archive.content.blocksRemaining()
var contentProgress = archive.content.blocks === 0 ? 0 : Math.round(contentBlocksProgress * 100 / archive.content.blocks)
var contentProgress = archive.content.blocks === 0 ? 0 : (contentBlocksProgress * 100 / archive.content.blocks).toFixed(2)
// TODO: fix hyperdrive-stats bug where blocksProgress > blocksTotal
// var contentProgress = st.blocksTotal === 0 ? 0 : Math.round(st.blocksProgress * 100 / st.blocksTotal)
progressOutput[2] = 'Metadata: ' + bar(metaProgress) + ' ' + metaProgress + '%'
Expand Down

0 comments on commit 8461baa

Please sign in to comment.