fix: don't set 'name' on null metadata

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2024-11-14 17:23:08 +01:00
parent 5ee4c9effa
commit ae30269eac
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

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