Zend_Service_Rackspace_Files::getObjects() throws exception when listing pseudo-directories #68

Closed
zfbot opened this Issue Apr 5, 2013 · 4 comments

1 participant

@zfbot

Jira Information

Original Issue: ZF-12552
Issue Type: Bug
Reporter: kynx
Created: 03/25/13
Assignee:
Components:

Description

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.

[1] http://docs.rackspace.com/files/api/v1/cf-devguide/content/Pseudo-Hierarchical_Folders_Directories-d1e1580.html

@zfbot

(Originally posted by: froschdesign on 03/25/13)

Hi Matt,
can you also add some unit tests?

@zfbot

(Originally posted by: kynx on 03/25/13)

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 :|

@zfbot

(Originally posted by: kynx on 03/25/13)

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

@zfbot

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF-12552

Known GitHub users mentioned in the original message or comment:
@kynx, @froschdesign

@froschdesign froschdesign pushed a commit that closed this issue Jan 3, 2014
@kynx kynx Fixed #68: Zend_Service_Rackspace_Files::getObjects() throws exceptio…
…n when listing pseudo-directories
9d00202
@froschdesign froschdesign added a commit to froschdesign/zf1 that referenced this issue Jan 3, 2014
@froschdesign froschdesign Fixes CS for #68 a382a5e
@xopherdeep xopherdeep pushed a commit to xopherdeep/Zend-Framework-v1 that referenced this issue Jul 3, 2014
@kynx kynx Fixed #68: Zend_Service_Rackspace_Files::getObjects() throws exceptio…
…n when listing pseudo-directories
9656a05
@xopherdeep xopherdeep pushed a commit to xopherdeep/Zend-Framework-v1 that referenced this issue Jul 3, 2014
@froschdesign froschdesign Fixes CS for #68 93c7b2a
@breathbath breathbath pushed a commit that referenced this issue Feb 24, 2016
@froschdesign froschdesign Fixes CS for #68 c2bcb7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment