mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #44201 from nextcloud/backport/43652/stable28
[stable28] Fixes for getting the filename in the FileInfo class
This commit is contained in:
commit
cd9c0b1c43
1 changed files with 3 additions and 1 deletions
|
|
@ -178,7 +178,9 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
|
|||
* @return string
|
||||
*/
|
||||
public function getName() {
|
||||
return isset($this->data['name']) ? $this->data['name'] : basename($this->getPath());
|
||||
return empty($this->data['name'])
|
||||
? basename($this->getPath())
|
||||
: $this->data['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue