Backport fix cache size (#1081)

As title

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1081
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
M M Arif
2022-03-13 16:27:07 +01:00
parent 204ea58865
commit 3b2a949c3a

View File

@@ -8,6 +8,12 @@ public class FilesData {
public static int returnOnlyNumber(String fileSize) {
return Integer.parseInt(fileSize.substring(0, fileSize.indexOf(" ")));
final int i = Integer.parseInt(fileSize.substring(0, fileSize.indexOf(" ")));
if(fileSize.substring(fileSize.lastIndexOf(" ") + 1).equals("GB")) {
return i * 1000;
}
else {
return i;
}
}
}