Merge pull request #291 from jbalogh/delimiter
Folder results should include the delimiter.
This commit is contained in:
commit
06476ccb3a
@ -333,7 +333,7 @@ class S3Backend(BaseBackend):
|
||||
for key_name, key in bucket.keys.items():
|
||||
if delimiter and delimiter in key_name:
|
||||
# If delimiter, we need to split out folder_results
|
||||
folder_results.add(key_name.split(delimiter)[0])
|
||||
folder_results.add(key_name.split(delimiter)[0] + delimiter)
|
||||
else:
|
||||
key_results.add(key)
|
||||
|
||||
|
@ -496,7 +496,7 @@ def test_bucket_key_listing_order():
|
||||
# Test delimiter with no prefix
|
||||
delimiter = '/'
|
||||
keys = [x.name for x in bucket.list(prefix=None, delimiter=delimiter)]
|
||||
keys.should.equal(['toplevel'])
|
||||
keys.should.equal(['toplevel/'])
|
||||
|
||||
delimiter = None
|
||||
keys = [x.name for x in bucket.list(prefix + 'x', delimiter)]
|
||||
|
@ -272,7 +272,7 @@ def test_bucket_key_listing_order():
|
||||
# Test delimiter with no prefix
|
||||
delimiter = '/'
|
||||
keys = [x.name for x in bucket.list(prefix=None, delimiter=delimiter)]
|
||||
keys.should.equal(['toplevel'])
|
||||
keys.should.equal(['toplevel/'])
|
||||
|
||||
delimiter = None
|
||||
keys = [x.name for x in bucket.list(prefix + 'x', delimiter)]
|
||||
|
Loading…
Reference in New Issue
Block a user