Skip to content

Commit

Permalink
Merge pull request #44200 from nextcloud/backport/43652/stable27
Browse files Browse the repository at this point in the history
[stable27] Fixes for getting the filename in the FileInfo class
  • Loading branch information
susnux authored Mar 14, 2024
2 parents 0a4b328 + deeca10 commit a2b924e
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 @@ -183,7 +183,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 a2b924e

Please sign in to comment.