From b5e2c0c2fda2fffec19cc8ce407a347a1da5339d Mon Sep 17 00:00:00 2001 From: DAB Date: Thu, 17 Sep 2015 16:15:48 -0500 Subject: [PATCH] Handle reading directory type by content type --- lib/OpenCloud/ObjectStore/Resource/DataObject.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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);