kszucs commented on a change in pull request #7655:
URL: https://github.com/apache/arrow/pull/7655#discussion_r450799961



##########
File path: python/pyarrow/fs.py
##########
@@ -146,13 +146,22 @@ def create_dir(self, path, recursive):
     def delete_dir(self, path):
         self.fs.rm(path, recursive=True)
 
-    def delete_dir_contents(self, path):
+    def _delete_dir_contents(self, path):
         for subpath in self.fs.listdir(path, detail=False):
             if self.fs.isdir(subpath):
                 self.fs.rm(subpath, recursive=True)
             elif self.fs.isfile(subpath):
                 self.fs.rm(subpath)
 
+    def delete_dir_contents(self, path):
+        if path in ("", "/"):

Review comment:
       Same as above, do we want to allow multiple slashes?




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


Reply via email to