diff --git a/tinyfilemanager.php b/tinyfilemanager.php
index 3e59f94..896697f 100644
--- a/tinyfilemanager.php
+++ b/tinyfilemanager.php
@@ -1902,7 +1902,16 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
foreach ($folders as $f) {
$is_link = is_link($path . '/' . $f);
$img = $is_link ? 'icon-link_folder' : 'fa fa-folder-o';
- $modif = date(FM_DATETIME_FORMAT, filemtime($path . '/' . $f));
+ $modif_raw = filemtime($path . '/' . $f);
+ $modif = date(FM_DATETIME_FORMAT, $modif_raw);
+ if ($calc_folder) {
+ $filesize_raw = fm_get_directorysize($path . '/' . $f);
+ $filesize = fm_get_filesize($filesize_raw);
+ }
+ else {
+ $filesize_raw = "";
+ $filesize = lng('Folder');
+ }
$perms = substr(decoct(fileperms($path . '/' . $f)), -4);
if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
$owner = posix_getpwuid(fileowner($path . '/' . $f));
@@ -1924,8 +1933,10 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
' . readlink($path . '/' . $f) . '' : '') ?>
- |
- |
+ ">
+
+ |
+ |
|
@@ -1947,7 +1958,8 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
foreach ($files as $f) {
$is_link = is_link($path . '/' . $f);
$img = $is_link ? 'fa fa-file-text-o' : fm_get_file_icon_class($path . '/' . $f);
- $modif = date(FM_DATETIME_FORMAT, filemtime($path . '/' . $f));
+ $modif_raw = filemtime($path . '/' . $f);
+ $modif = date(FM_DATETIME_FORMAT, $modif_raw);
$filesize_raw = fm_get_size($path . '/' . $f);
$filesize = fm_get_filesize($filesize_raw);
$filelink = '?p=' . urlencode(FM_PATH) . '&view=' . urlencode($f);
@@ -1983,10 +1995,10 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
' . readlink($path . '/' . $f) . '' : '') ?>
-
+ | ">
|
- |
+ |
|
@@ -2453,7 +2465,7 @@ function fm_get_filesize($size)
/**
* Get director total size
* @param string $directory
- * @return string
+ * @return int
*/
function fm_get_directorysize($directory) {
global $calc_folder;
@@ -2466,7 +2478,7 @@ function fm_get_directorysize($directory) {
}
else if ($file->isDir()) { $dirCount++; }
// return [$size, $count, $dirCount];
- return fm_get_filesize($size);
+ return $size;
}
else return 'Folder'; // Quick output
}