mirror of https://github.com/apache/jclouds.git
Azure Blob: do not filter out prefixes.
We should not filter out prefixes when listing containers, similarly to the way swift behaves. This makes the marker blobs apparently to the user.
This commit is contained in:
parent
03248b4c94
commit
841a184898
|
@ -25,7 +25,6 @@ import javax.inject.Singleton;
|
|||
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||
import org.jclouds.blobstore.domain.PageSet;
|
||||
import org.jclouds.blobstore.domain.StorageMetadata;
|
||||
import org.jclouds.blobstore.domain.StorageType;
|
||||
import org.jclouds.blobstore.domain.internal.PageSetImpl;
|
||||
import org.jclouds.blobstore.functions.PrefixToResourceMetadata;
|
||||
|
||||
|
@ -61,10 +60,7 @@ public class ListBlobsResponseToResourceList implements
|
|||
|
||||
Map<String, StorageMetadata> nameToMd = Maps.uniqueIndex(contents, indexer);
|
||||
for (String prefix : from.getBlobPrefixes()) {
|
||||
prefix = prefix.endsWith("/") ? prefix.substring(0, prefix.lastIndexOf('/')) : prefix;
|
||||
if (!nameToMd.containsKey(prefix)
|
||||
|| nameToMd.get(prefix).getType() != StorageType.RELATIVE_PATH)
|
||||
contents.add(prefix2ResourceMd.apply(prefix));
|
||||
contents.add(prefix2ResourceMd.apply(prefix));
|
||||
}
|
||||
return new PageSetImpl<StorageMetadata>(contents, from.getNextMarker());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue