This commit is contained in:
Lars Jung 2013-07-08 22:38:41 +02:00
parent fa6e7cfa1a
commit 695b357668

View file

@ -2,7 +2,7 @@
class Item {
private static $FOLDER_SIZE_CMD = "du -sb \"[DIR]\"";
private static $FOLDER_SIZE_CMD = "du -sk \"[DIR]\"";
public static function cmp($item1, $item2) {
@ -58,7 +58,7 @@ class Item {
$options = $app->get_options();
if ($options["foldersize"]["enabled"]) {
$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 {
$this->size = @filesize($this->abs_path);