kopia lustrzana https://github.com/gaul/s3proxy
Use native prefix support instead of emulation
rodzic
cc58282194
commit
58c4600d3f
|
@ -773,7 +773,7 @@ final class S3ProxyHandler extends AbstractHandler {
|
||||||
}
|
}
|
||||||
String prefix = request.getParameter("prefix");
|
String prefix = request.getParameter("prefix");
|
||||||
if (prefix != null && !prefix.isEmpty()) {
|
if (prefix != null && !prefix.isEmpty()) {
|
||||||
options = options.inDirectory(prefix);
|
options = options.prefix(prefix);
|
||||||
}
|
}
|
||||||
String marker = request.getParameter("marker");
|
String marker = request.getParameter("marker");
|
||||||
if (marker != null) {
|
if (marker != null) {
|
||||||
|
@ -836,16 +836,7 @@ final class S3ProxyHandler extends AbstractHandler {
|
||||||
case FOLDER:
|
case FOLDER:
|
||||||
continue;
|
continue;
|
||||||
case RELATIVE_PATH:
|
case RELATIVE_PATH:
|
||||||
String name = metadata.getName();
|
commonPrefixes.add(metadata.getName());
|
||||||
if (delimiter != null) {
|
|
||||||
int index = name.indexOf(delimiter,
|
|
||||||
Strings.nullToEmpty(prefix).length());
|
|
||||||
if (index != -1) {
|
|
||||||
name = name.substring(0, index + 1);
|
|
||||||
}
|
|
||||||
name += delimiter;
|
|
||||||
}
|
|
||||||
commonPrefixes.add(name);
|
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Ładowanie…
Reference in New Issue