Skip to content

Commit f2a18c4

Browse files
committed
Fix to unlink directories without an object on S3.
1 parent 8ae54e5 commit f2a18c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

yas3fs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,8 +1830,8 @@ def rmdir(self, path):
18301830
logger.debug("rmdir '%s' cache ENOENT" % (path))
18311831
raise FuseOSError(errno.ENOENT)
18321832
k = self.get_key(path)
1833-
if not k and not self.folder_has_contents(path):
1834-
logger.debug("rmdir '%s' key ENOENT" % (path))
1833+
if not k and not self.cache.has(path) and not self.folder_has_contents(path):
1834+
logger.debug("rmdir '%s' S3 ENOENT" % (path))
18351835
raise FuseOSError(errno.ENOENT)
18361836
dirs = self.cache.get(path, 'readdir')
18371837
if dirs == None:

0 commit comments

Comments
 (0)