Skip to content

Commit

Permalink
chore: remove extra conditions from list (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
athakor authored Sep 9, 2020
1 parent ae9d4a1 commit c1a5583
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,14 @@ public Tuple<String, Iterable<StorageObject>> list(String bucket, Map<Option, ?>
List<StorageObject> values = new ArrayList<>();
Map<String, StorageObject> folders = new HashMap<>();
for (StorageObject so : metadata.values()) {
if (!so.getName().startsWith(prefix)) {
if (!so.getBucket().equals(bucket) || !so.getName().startsWith(prefix)) {
continue;
}
if (processedAsFolder(so, delimiter, prefix, folders)) {
continue;
}
so.setSize(size(so));
if (so.getBucket().equals(bucket)) {
values.add(so);
}
values.add(so);
}
values.addAll(folders.values());

Expand Down

0 comments on commit c1a5583

Please sign in to comment.