Correct calculation for shared folder size
This commit is contained in:
parent
18e776fa2f
commit
ac0d41418e
|
@ -128,11 +128,14 @@ class OC_FILESTORAGE_SHARED {
|
|||
|
||||
}
|
||||
|
||||
// TODO Get size of shared directory
|
||||
public function filesize($path) {
|
||||
echo "filesize";
|
||||
if ($path == "" || $path == "/") {
|
||||
return 10000;
|
||||
$size = 0;
|
||||
$dir = OC_FILESTORAGE_SHARED::opendir($path);
|
||||
while (($filename = readdir($dir)) != false) {
|
||||
$size += OC_FILESTORAGE_SHARED::filesize($filename);
|
||||
}
|
||||
return $size;
|
||||
} else {
|
||||
$source = OC_SHARE::getSource($path);
|
||||
if ($source) {
|
||||
|
|
Loading…
Reference in New Issue