Skip to content

Commit

Permalink
FilesystemStorageStrategyImpl.getBlob() for a folder return blob as t…
Browse files Browse the repository at this point in the history
…ype Blob (#187)

Co-authored-by: Valentin Popov <popov@mailarchiva.ru>
  • Loading branch information
valenpo and Valentin Popov committed Nov 11, 2023
1 parent a2628f9 commit 47e3022
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ public Blob getBlob(final String container, final String key) {
.contentType(contentType)
.expires(expires)
.tier(tier)
.type(isDirectory ? StorageType.FOLDER : StorageType.BLOB)
.userMetadata(userMetadata.build());
} else {
builder.payload(byteSource)
Expand All @@ -482,7 +481,7 @@ public Blob getBlob(final String container, final String key) {
} catch (IOException e) {
throw Throwables.propagate(e);
}
Blob blob = builder.build();
Blob blob = builder.type(isDirectory ? StorageType.FOLDER : StorageType.BLOB).build();
blob.getMetadata().setContainer(container);
blob.getMetadata().setLastModified(new Date(file.lastModified()));
blob.getMetadata().setSize(file.length());
Expand Down

0 comments on commit 47e3022

Please sign in to comment.