Skip to content

Commit f1da90f

Browse files
authored
Merge pull request #44199 from nextcloud/backport/43652/stable26
[stable26] Fixes for getting the filename in the FileInfo class
2 parents 2d276c8 + 3a88438 commit f1da90f

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
@@ -185,7 +185,9 @@ public function getMimePart() {
185185
* @return string
186186
*/
187187
public function getName() {
188-
return isset($this->data['name']) ? $this->data['name'] : basename($this->getPath());
188+
return empty($this->data['name'])
189+
? basename($this->getPath())
190+
: $this->data['name'];
189191
}
190192

191193
/**

0 commit comments

Comments
 (0)