Skip to content

Commit f547fd8

Browse files
authored
Should not attempt to create bucket by default on mkdir (fsspec#701)
1 parent bebff27 commit f547fd8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gcsfs/core.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ async def _mkdir(
878878
acl="projectPrivate",
879879
default_acl="bucketOwnerFullControl",
880880
location=None,
881-
create_parents=True,
881+
create_parents=False,
882882
enable_versioning=False,
883883
enable_object_retention=False,
884884
iam_configuration=None,
@@ -931,10 +931,11 @@ async def _mkdir(
931931
if "/" in path and create_parents and await self._exists(bucket):
932932
# nothing to do
933933
return
934-
if "/" in path and not create_parents:
934+
if "/" in path:
935935
if await self._exists(bucket):
936936
return
937-
raise FileNotFoundError(bucket)
937+
if not create_parents:
938+
raise FileNotFoundError(bucket)
938939

939940
json_data = {"name": bucket}
940941
location = location or self.default_location

0 commit comments

Comments
 (0)