ayushtkn commented on a change in pull request #2054:
URL: https://github.com/apache/ozone/pull/2054#discussion_r595960251



##########
File path: 
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
##########
@@ -496,6 +496,11 @@ public boolean delete(Path f, boolean recursive) throws 
IOException {
     String key = pathToKey(f);
     boolean result;
 
+    if (f.isRoot()) {

Review comment:
       There is a similar check below inside `innerDelete`-
   ```
       try {
         DeleteIterator iterator = new DeleteIterator(f, recursive);
   
         if (f.isRoot()) {
           LOG.warn("Cannot delete root directory.");
           return false;
         }
   ```
   Does that not work? Or will that be redundant post this? 
   In any case this should be inside `    if (status.isDirectory()) {` block




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

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