Skip to content

Commit b660f4d

Browse files
authored
Fix local_path creation and update gsutil command
1 parent 78c2d35 commit b660f4d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/openpi/shared/download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def _download_gsutil(url: str, local_path: pathlib.Path, **kwargs) -> None:
109109
logger.warning("gsutil not found, falling back to gcsfs. This may fail if GCP credentials are not configured correctly.")
110110
_download_fsspec(url, local_path, **kwargs)
111111
return
112-
local_path.parent.mkdir(parents=True, exist_ok=True)
112+
local_path.mkdir(parents=True, exist_ok=True)
113113
subprocess.run(
114-
["gsutil", "-m", "cp", "-r", url, str(local_path)],
114+
["gsutil", "-m", "cp", "-r", f"{url}/*", str(local_path)],
115115
check=True,
116116
)
117117

0 commit comments

Comments
 (0)