Skip to content

[stable18] fix s3 doesDirectoryExist check for empty directories - #22777

Merged
rullzer merged 2 commits into
stable18from
backport/22747/stable18
Sep 11, 2020
Merged

[stable18] fix s3 doesDirectoryExist check for empty directories#22777
rullzer merged 2 commits into
stable18from
backport/22747/stable18

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

backport of #22747

icewind1991and others added 2 commits September 10, 2020 13:14
if a directory is empty, only the 'marker' object `/` exists.
since not all s3 implementations return just the prefix when listing objects by prefix,
when listing objects by the folder prefix, nothing will be returned if the directory is empty.
by not including the trailing slash in the prefix, the folder marked will always be returned if it exists
Signed-off-by: Robin Appelman <robin@icewind.nl>
…ermined
Signed-off-by: Julius Härtl <jus@bitgrid.net>

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@MorrisJobkeMorrisJobke added 3. to review Waiting for reviews bug labels Sep 10, 2020

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@rullzer
rullzer merged commit 0a9979d into stable18Sep 11, 2020
@rullzer
rullzer deleted the backport/22747/stable18 branch September 11, 2020 06:48
@rullzerrullzer mentioned this pull request Sep 28, 2020
1 task
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@rullzer@MorrisJobke@icewind1991@juliusknorr