ayushtkn commented on a change in pull request #3431:
URL: https://github.com/apache/hadoop/pull/3431#discussion_r707892932



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##########
@@ -182,7 +183,7 @@ public static boolean fullyDelete(final File dir, boolean 
tryGrantPermissions) {
       return true;
     }
     // handle nonempty directory deletion
-    if (!fullyDeleteContents(dir, tryGrantPermissions)) {
+    if (!FileUtils.isSymlink(dir) && !fullyDeleteContents(dir, 
tryGrantPermissions)) {

Review comment:
       Could have tried ``dir.isDirectory()`` rather than 
``!FileUtils.isSymlink(dir) ``?
   For files also ``fullyDeleteContents(dir, tryGrantPermissions)``, this call 
is irrelevant, it will just go and do a ``listFiles`` and return back with a 
true, I think?




-- 
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]

Reply via email to