fx19880617 commented on a change in pull request #5836: URL: https://github.com/apache/incubator-pinot/pull/5836#discussion_r468068735
########## File path: pinot-plugins/pinot-file-system/pinot-s3/src/main/java/org/apache/pinot/plugin/filesystem/S3PinotFS.java ########## @@ -391,7 +393,11 @@ public long length(URI fileUri) listObjectsV2Response.contents().stream().forEach(object -> { //Only add files and not directories if (!object.key().equals(fileUri.getPath()) && !object.key().endsWith(DELIMITER)) { - builder.add(object.key()); + String fileKey = object.key(); + if(fileKey.startsWith(DELIMITER)){ Review comment: nit: `if (fileKey.startsWith(DELIMITER)) {` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org