Skip to content

Commit

Permalink
Fix name key in S3 child map
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Jun 4, 2019
1 parent ab56c73 commit 29ac16b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,10 @@ public Map<String, BlobContainer> children() throws IOException {
for (final String summary : list.getCommonPrefixes()) {
final String name = summary.substring(keyPath.length());
if (name.isEmpty() == false) {
final BlobPath path = path().add(name);
entries.add(entry(name.substring(0, name.length() - 1), blobStore.blobContainer(path)));
// Stripping the trailing slash off of the common prefix
final String last = name.substring(0, name.length() - 1);
final BlobPath path = path().add(last);
entries.add(entry(last, blobStore.blobContainer(path)));
}
}
assert list.getObjectSummaries().stream().noneMatch(s -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected SecureSettings credentials() {
protected void createRepository(String repoName) {
Settings.Builder settings = Settings.builder()
.put("bucket", System.getProperty("test.s3.bucket"))
.put("base_path", System.getProperty("test.s3.base", ""));
.put("base_path", System.getProperty("test.s3.base", "testpath"));
final String endpointPath = System.getProperty("test.s3.endpoint");
if (endpointPath != null) {
try {
Expand Down

0 comments on commit 29ac16b

Please sign in to comment.