mirror of
https://github.com/nextcloud/server.git
synced 2024-08-13 14:11:10 +02:00
return size '0' if the trashbin folder doesn't exists yet
This commit is contained in:
parent
7ad0fee0b5
commit
a7f6a051ad
@ -904,12 +904,12 @@ class Trashbin {
|
||||
* get current size of trash bin from a given user
|
||||
*
|
||||
* @param string $user user who owns the trash bin
|
||||
* @return mixed trash bin size or false if no trash bin size is stored
|
||||
* @return integer trash bin size
|
||||
*/
|
||||
private static function getTrashbinSize($user) {
|
||||
$view = new \OC\Files\View('/' . $user);
|
||||
$fileInfo = $view->getFileInfo('/files_trashbin');
|
||||
return $fileInfo['size'];
|
||||
return isset($fileInfo['size']) ? $fileInfo['size'] : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user