summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/FileInfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/FileInfo.php')
-rw-r--r--lib/private/Files/FileInfo.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index 5ba2f27b78b..979ceacda66 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -178,7 +178,9 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
* @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'];
}
/**