mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-12 00:04:19 +02:00
Fixes #154
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class Item {
|
class Item {
|
||||||
|
|
||||||
private static $FOLDER_SIZE_CMD = "du -sb \"[DIR]\"";
|
private static $FOLDER_SIZE_CMD = "du -sk \"[DIR]\"";
|
||||||
|
|
||||||
public static function cmp($item1, $item2) {
|
public static function cmp($item1, $item2) {
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ class Item {
|
|||||||
$options = $app->get_options();
|
$options = $app->get_options();
|
||||||
if ($options["foldersize"]["enabled"]) {
|
if ($options["foldersize"]["enabled"]) {
|
||||||
$cmd = str_replace("[DIR]", $this->abs_path, Item::$FOLDER_SIZE_CMD);
|
$cmd = str_replace("[DIR]", $this->abs_path, Item::$FOLDER_SIZE_CMD);
|
||||||
$this->size = intval(preg_replace("/\s.*$/", "", `$cmd`), 10);
|
$this->size = intval(preg_replace("/\s.*$/", "", `$cmd`), 10) * 1024;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->size = @filesize($this->abs_path);
|
$this->size = @filesize($this->abs_path);
|
||||||
|
Reference in New Issue
Block a user