fix sort when size is TB

#470 ,
pull/493/head
qkqpttgf 2021-11-23 20:07:55 +08:00 committed by GitHub
parent e0d7bba0fb
commit 78c616b52d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -785,6 +785,7 @@
} }
function size_reformat(str) { function size_reformat(str) {
if (str.substr(-1)==' ') str=str.substr(0,str.length-1); if (str.substr(-1)==' ') str=str.substr(0,str.length-1);
if (str.substr(-2)=='TB') num=str.substr(0,str.length-3)*1024*1024*1024*1024;
if (str.substr(-2)=='GB') num=str.substr(0,str.length-3)*1024*1024*1024; if (str.substr(-2)=='GB') num=str.substr(0,str.length-3)*1024*1024*1024;
if (str.substr(-2)=='MB') num=str.substr(0,str.length-3)*1024*1024; if (str.substr(-2)=='MB') num=str.substr(0,str.length-3)*1024*1024;
if (str.substr(-2)=='KB') num=str.substr(0,str.length-3)*1024; if (str.substr(-2)=='KB') num=str.substr(0,str.length-3)*1024;