Merge pull request #49291 from nextcloud/encoding-wrapper-metadata

fix: don't set 'name' on null metadata
This commit is contained in:
Côme Chilliet 2024-12-03 21:47:46 +01:00 committed by GitHub
commit 0729e264f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}