Skip to content

Firefly III: a personal finances manager

Allow phpBytes to work with configs where gigabyte file sizes are allowed

Niek van der Kooy51570a5d08ea
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index 3b2a140dc4..5158d2ab03 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -220,6 +220,13 @@ class Steam
return intval($bytes);
}
+ if (!(stripos($string, 'g') === false)) {
+ // has a G in it, remove the G and multiply by (1024)^3.
+ $bytes = bcmul(rtrim($string, 'gG'), '1073741824');
+
+ return intval($bytes);
+ }
+
return intval($string);