jackjlli commented on a change in pull request #3671: Make different PinotFS concrete classes have the same behaviors URL: https://github.com/apache/incubator-pinot/pull/3671#discussion_r254903542
########## File path: pinot-filesystem/src/main/java/com/linkedin/pinot/filesystem/LocalPinotFS.java ########## @@ -97,7 +97,8 @@ public boolean move(URI srcUri, URI dstUri, boolean overwrite) throws IOExceptio public boolean copy(URI srcUri, URI dstUri) throws IOException { File srcFile = new File(decodeURI(srcUri.getRawPath())); File dstFile = new File(decodeURI(dstUri.getRawPath())); - if (dstFile.exists()) { + // delete dst only if dst isn't under src. + if (!dstFile.getCanonicalPath().startsWith(srcFile.getCanonicalPath()) && dstFile.exists()) { Review comment: @jenniferdai I've verified that all code references to these methods have the same contract. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pinot.apache.org For additional commands, e-mail: dev-h...@pinot.apache.org