From dea5219244b5d931db102b02d95e72f784eec7d1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 27 May 2014 14:24:35 +0200 Subject: [PATCH] Fix folder name for storage root --- apps/files/lib/helper.php | 2 +- lib/private/files/fileinfo.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()); } /**