mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-08 10:32:23 -04:00
Fixes #154
This commit is contained in:
parent
fa6e7cfa1a
commit
695b357668
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue