summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-09-19 19:01:32 +0200
committerRobin Appelman <robin@icewind.nl>2018-10-17 14:56:51 +0200
commitea42474b318815db33c125400b74600d852df89d (patch)
tree79f133f0c97257d5a58250e871a44ff2e48506e0 /lib
parentd38163e89574e9d2a12be0cdf8f72e1e9bb4b75f (diff)
downloadnextcloud-server-ea42474b318815db33c125400b74600d852df89d.tar.gz
nextcloud-server-ea42474b318815db33c125400b74600d852df89d.zip
use name in fileinfo if set
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/FileInfo.php2
1 files changed, 1 insertions, 1 deletions
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());
}
/**