diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index 7d8906e225..b84b6c06d3 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -113,7 +113,7 @@ class Helper if (\OC::$server->getPreviewManager()->isMimeSupported($i['mimetype'])) { $entry['isPreviewAvailable'] = true; } - $entry['name'] = $i['name']; + $entry['name'] = $i->getName(); $entry['permissions'] = $i['permissions']; $entry['mimetype'] = $i['mimetype']; $entry['size'] = $i['size']; diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php index e7afeb4ccc..d012c0c5a6 100644 --- a/lib/private/files/fileinfo.php +++ b/lib/private/files/fileinfo.php @@ -108,7 +108,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { * @return string */ public function getName() { - return $this->data['name']; + return basename($this->getPath()); } /**