s3proxy icon indicating copy to clipboard operation
s3proxy copied to clipboard

S3Proxy incorrectly demangles _$folder_ blob names

Open gaul opened this issue 10 years ago • 0 comments

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);
}

gaul avatar Jun 30 '15 21:06 gaul