bhattmanish98 commented on code in PR #7496:
URL: https://github.com/apache/hadoop/pull/7496#discussion_r2021072904


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -1528,10 +1528,31 @@ public AbfsRestOperation deleteBlobPath(final Path 
blobPath,
    */
   @Override
   public boolean checkIsDir(AbfsHttpOperation result) {
-    String resourceType = result.getResponseHeader(X_MS_META_HDI_ISFOLDER);
+    String dirHeaderName = getHeaderNameIgnoreCase(result, 
X_MS_META_HDI_ISFOLDER);
+    // If the header is not found, return false (not a directory)
+    if (dirHeaderName == null) {
+      return false;
+    }
+
+    String resourceType = result.getResponseHeader(dirHeaderName);
     return resourceType != null && resourceType.equals(TRUE);

Review Comment:
   Since it was an existing line of code, I didn’t change it. However, it does 
make sense to remove this null check.



-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to