jenniferdai 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_r254839261
##########
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:
You just need to make sure that all code references to these methods have
the same contract as well.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]