s3proxy
s3proxy copied to clipboard
S3Proxy incorrectly demangles _$folder_ blob names
jclouds demangles blob names to emulate directories which are not useful to S3Proxy. @kahing suggests working around this with:
try {
Field f = BlobStoreConstants.class.getDeclaredField("DIRECTORY_SUFFIXES");
f.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(f, f.getModifiers() & ~Modifier.FINAL);
f.set(null, ImmutableList.of("/"));
} catch (NoSuchFieldException | IllegalAccessException e) {
throw propagate(e);
}