fix sort when size is TB

#470 ,
This commit is contained in:
qkqpttgf
2021-11-23 20:07:55 +08:00
committed by GitHub
parent e0d7bba0fb
commit 78c616b52d
+1
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;