]> source.dussan.org Git - nextcloud-server.git/commit
fix s3 doesDirectoryExist check for empty directories
authorRobin Appelman <robin@icewind.nl>
Wed, 9 Sep 2020 12:29:11 +0000 (14:29 +0200)
committerJulius Härtl <jus@bitgrid.net>
Thu, 10 Sep 2020 06:11:55 +0000 (08:11 +0200)
commitfc96fa0cc7081307a8c03457a026fdc045d88f02
treebb701d505fefdf7446fc6a07452fe0aee5cd290e
parent9780c4f755830efc1495a8c79b3dfaa098406452
fix s3 doesDirectoryExist check for empty directories

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>
apps/files_external/lib/Lib/Storage/AmazonS3.php