From ea42474b318815db33c125400b74600d852df89d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 19 Sep 2018 19:01:32 +0200 Subject: use name in fileinfo if set Signed-off-by: Robin Appelman --- lib/private/Files/FileInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index 4c38ba769d3..53f73f0f95d 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -175,7 +175,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { * @return string */ public function getName() { - return basename($this->getPath()); + return isset($this->data['name']) ? $this->data['name'] : basename($this->getPath()); } /** -- cgit v1.2.3