diff --git a/lib/OpenCloud/ObjectStore/Resource/DataObject.php b/lib/OpenCloud/ObjectStore/Resource/DataObject.php index 731d1c370..b1d9f4506 100644 --- a/lib/OpenCloud/ObjectStore/Resource/DataObject.php +++ b/lib/OpenCloud/ObjectStore/Resource/DataObject.php @@ -97,10 +97,8 @@ public function __construct(Container $container, $data = null) parent::__construct($container->getService()); // For pseudo-directories, we need to ensure the name is set - if (!empty($data->subdir)) { - $this->setName($data->subdir)->setDirectory(true); - - return; + if (!empty($data->content_type) && $data->content_type == 'application/directory') { + $this->setDirectory(true); } $this->populate($data);