ZF-12552: Zend_Service_Rackspace_Files::getObjects() throws exception when listing pseudo-directories


According to the Rackspace docs[1] you should be able to get a listing of pseudo-directories by passing 'delimiter' and 'prefix' params to getObjects, something like:

$cf->getObjects('mycontainer', array('delimiter' => '/', 'prefix' => 'path/to/mydir/');

But if you try this you get a Zend_Service_Rackspace_Files_Exception - "You must pass the name of the object in the array (name)".

The problem is that when listing directories the response contains a 'subdir' element, not a 'name' element. The attached patch allows Zend_Service_Rackspace_Files_Object to deal with this correctly.



Hi Matt, can you also add some unit tests?

Yeah, will do. I'm also trying to track these issues against ZF2 and tend to do tests there... but it's all becoming a bit of a headache :|

Offline test. Not sure how I'd go about writing an online test. Pointers welcome!

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: