Skip to content

Empty directory in aws key breaks listdir api. #770

Open

Description

@varunmittal91

Example: s3://test_bucket//test_path

The double slash '//' is valid part of the key, we were able to validate that for a customer. But due to lstrip in core.py on key, s3 will fail to list without this exact string.

Current behavior

s3.listdir("s3://test_bucket//test_path") -> []

Expected behavior

s3.listdir("s3://test_bucket//test_path") -> [{'Key': 'test_bucket//test_path/dir1', 'Size': 0, 'StorageClass': 'DIRECTORY', 'type': 'directory', 'size': 0, 'name': 'test_bucket//test_path/dir1'}
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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