mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #44200 from nextcloud/backport/43652/stable27
[stable27] Fixes for getting the filename in the FileInfo class
This commit is contained in:
commit
a2b924edc6
1 changed files with 3 additions and 1 deletions
|
|
@ -183,7 +183,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