summaryrefslogtreecommitdiff
path: root/fs/s3fs.py
diff options
context:
space:
mode:
Diffstat (limited to 'fs/s3fs.py')
-rw-r--r--fs/s3fs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/s3fs.py b/fs/s3fs.py
index 80f3f08..031f5d6 100644
--- a/fs/s3fs.py
+++ b/fs/s3fs.py
@@ -496,6 +496,8 @@ class S3FS(FS):
def removedir(self,path,recursive=False,force=False):
"""Remove the directory at the given path."""
+ if normpath(path) in ('', '/'):
+ raise DeleteRootError(path)
s3path = self._s3path(path)
if s3path != self._prefix:
s3path = s3path + self._separator