Skip to content

Commit a2b924e

Browse files
authored
Merge pull request #44200 from nextcloud/backport/43652/stable27
[stable27] Fixes for getting the filename in the FileInfo class
2 parents 0a4b328 + deeca10 commit a2b924e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/private/Files/FileInfo.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ public function getMimePart() {
183183
* @return string
184184
*/
185185
public function getName() {
186-
return isset($this->data['name']) ? $this->data['name'] : basename($this->getPath());
186+
return empty($this->data['name'])
187+
? basename($this->getPath())
188+
: $this->data['name'];
187189
}
188190

189191
/**

0 commit comments

Comments
 (0)