mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #43652 from hopleus/bugfix/fixed-get-filename-in-fileinfo
This commit is contained in:
commit
f316edb9ff
1 changed files with 3 additions and 1 deletions
|
|
@ -181,7 +181,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