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:
parent
a3d8185d8e
commit
4f49c452ac
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue