mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Fixes for getting the file name in the cases when the file name key is received, but it is empty
Signed-off-by: hopleus <hopleus@gmail.com>
This commit is contained in:
parent
d52ebaa7cd
commit
1c085a96eb
1 changed files with 5 additions and 1 deletions
|
|
@ -181,7 +181,11 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
|
|||
* @return string
|
||||
*/
|
||||
public function getName() {
|
||||
return isset($this->data['name']) ? $this->data['name'] : basename($this->getPath());
|
||||
if (isset($this->data['name']) && !empty($this->data['name'])) {
|
||||
return $this->data['name'];
|
||||
}
|
||||
|
||||
return basename($this->getPath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue