anmolanmol1234 commented on code in PR #7265:
URL: https://github.com/apache/hadoop/pull/7265#discussion_r1938967651
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java:
##########
@@ -535,34 +541,20 @@ public boolean rename(final Path src, final Path dst)
throws IOException {
return tryGetFileStatus(qualifiedSrcPath, tracingContext) != null;
}
- FileStatus dstFileStatus = null;
+ FileStatus dstFileStatus = tryGetFileStatus(qualifiedDstPath,
tracingContext);
+ Path adjustedDst = dst;
if (qualifiedSrcPath.equals(qualifiedDstPath)) {
- // rename to itself
- // - if it doesn't exist, return false
- // - if it is file, return true
- // - if it is dir, return false.
- dstFileStatus = tryGetFileStatus(qualifiedDstPath, tracingContext);
- if (dstFileStatus == null) {
+ return dstFileStatus != null && !dstFileStatus.isDirectory();
+ } else if (dstFileStatus != null) {
Review Comment:
dont see a need for this else if
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]