aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-11-14 17:23:08 +0100
committerRobin Appelman <robin@icewind.nl>2024-12-03 19:12:45 +0100
commitae30269eac0d0535fbdd343d3f00ec93eea16ac1 (patch)
treeabfead11ce8cf0dc22ef0cd11bf6e839a0ebcc14 /lib
parent5ee4c9effa991306d2bb536c3ce23d1fe3eaccc3 (diff)
downloadnextcloud-server-ae30269eac0d0535fbdd343d3f00ec93eea16ac1.tar.gz
nextcloud-server-ae30269eac0d0535fbdd343d3f00ec93eea16ac1.zip
fix: don't set 'name' on null metadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index d5afbad9592..92e20cfb3df 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -280,7 +280,9 @@ class Encoding extends Wrapper {
public function getMetaData(string $path): ?array {
$entry = $this->storage->getMetaData($this->findPathToUse($path));
- $entry['name'] = trim(Filesystem::normalizePath($entry['name']), '/');
+ if ($entry !== null) {
+ $entry['name'] = trim(Filesystem::normalizePath($entry['name']), '/');
+ }
return $entry;
}