Skip to content

Commit 0fbefba

Browse files
authored
Don't lsbuckets for isdir(bucket) (#856)
1 parent caf15c8 commit 0fbefba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

s3fs/core.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,7 @@ async def _pipe_file(self, path, data, chunksize=50 * 2**20, **kwargs):
11271127
"create_multipart_upload", Bucket=bucket, Key=key, **kwargs
11281128
)
11291129

1130+
# TODO: cancel MPU if the following fails
11301131
out = [
11311132
await self._call_s3(
11321133
"upload_part",
@@ -1439,7 +1440,7 @@ async def _isdir(self, path):
14391440
path = self._strip_protocol(path).strip("/")
14401441
# Send buckets to super
14411442
if "/" not in path:
1442-
if path in await self._lsbuckets(path):
1443+
if path == "":
14431444
return True
14441445
try:
14451446
out = await self._lsdir(path)

0 commit comments

Comments
 (0)