Implemented issue #953 - More precise filesize.

This commit is contained in:
Martin Edenhofer 2017-04-17 10:16:14 +02:00
parent b3ae159c2e
commit a9b9cdc01d

View file

@ -635,7 +635,7 @@ class App.Utils
# human readable file size
@humanFileSize: (size) ->
if size > ( 1024 * 1024 )
size = Math.round( size / ( 1024 * 1024 ) ) + ' MB'
size = (Math.round( size * 10 / ( 1024 * 1024 ) ) / 10 ) + ' MB'
else if size > 1024
size = Math.round( size / 1024 ) + ' KB'
else