diff --git a/src/stactools/core/io/__init__.py b/src/stactools/core/io/__init__.py index f9f50d3b..b9eb6cdd 100644 --- a/src/stactools/core/io/__init__.py +++ b/src/stactools/core/io/__init__.py @@ -109,7 +109,7 @@ def write_text_to_href(self, href: str, txt: str, **kwargs: Any) -> None: txt (str): The text to write. **kwargs: Additional keyword arguments to be passed to fsspec.open. """ - with fsspec.open(href, "w", **kwargs) as destination: + with fsspec.open(href, "w", auto_mkdir=True, **kwargs) as destination: destination.write(txt)