BUGFIX Return zero file size for folders (mainly to avoid listing it in AssetAdmin tables, but also because it doesn't make sense for folders)

This commit is contained in:
Ingo Schommer 2012-02-15 19:33:14 +01:00
parent a3d8185d8e
commit 4f49c452ac
1 changed files with 9 additions and 0 deletions

View File

@ -331,6 +331,15 @@ class Folder extends File {
$this->setField('Title',pathinfo($filename, PATHINFO_BASENAME));
parent::setFilename($filename);
}
/**
* A folder doesn't have a (meaningful) file size.
*
* @return Null
*/
function getSize() {
return null;
}
/**
* Delete the database record (recursively for folders) without touching the filesystem