mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed bug for hash size display
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4040 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
daad701f52
commit
b7b8831f71
@ -780,7 +780,7 @@ void FileIndexMonitor::updateCycle()
|
||||
|
||||
static std::string friendlyUnit(uint64_t val)
|
||||
{
|
||||
const std::string units[4] = {"B","KB","MB","GB"};
|
||||
const std::string units[5] = {"B","KB","MB","GB","TB"};
|
||||
char buf[50] ;
|
||||
|
||||
double fact = 1.0 ;
|
||||
@ -794,7 +794,7 @@ static std::string friendlyUnit(uint64_t val)
|
||||
else
|
||||
fact *= 1024.0f ;
|
||||
|
||||
sprintf(buf,"%2.2f",double(val)/fact) ;
|
||||
sprintf(buf,"%2.2f",double(val)/fact*1024.0f) ;
|
||||
return std::string(buf) + " TB";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user