Skip to content

Commit

Permalink
Merge pull request #44199 from nextcloud/backport/43652/stable26
Browse files Browse the repository at this point in the history
[stable26] Fixes for getting the filename in the FileInfo class
  • Loading branch information
susnux authored Mar 14, 2024
2 parents 2d276c8 + 3a88438 commit f1da90f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/Files/FileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ public function getMimePart() {
* @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'];
}

/**
Expand Down

0 comments on commit f1da90f

Please sign in to comment.