mirror of
https://github.com/gitnex-org/gitnex.git
synced 2026-05-24 13:51:45 -05:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user