Skip to content

rm does not delete the directory if its input is a directory with recursive True #918

@LuchiLucs

Description

@LuchiLucs

As stated in the title, it seems to me, that the API rm does not remove the directory itself if the input path its a directory and the recursive flag is set to True:

  await self.fs._rm(
      path=f"{self.bucket_name}/{remote_path}",
      recursive=True,
      **kwargs,
  )

I checked by s3 bucket from the dashboard and the directory does still exists, while its content does not. The documentation says that:

recursive (bool) – If file(s) are directories, recursively delete contents and then also remove the directory

I guess the implementation does not follow the documentation and a direct rmdir API call is needed in order to delete also the directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions