Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Be consistent about syntax use for path construction
  • Loading branch information
PGijsbers committed Sep 28, 2024
commit 8f78f0c23b773e98b06de9bd768be91e958c3b84
4 changes: 2 additions & 2 deletions openml/_api_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ def _download_minio_bucket(source: str, destination: str | Path) -> None:
if file_object.object_name is None:
raise ValueError(f"Object name is None for object {file_object!r}")

marker = Path(destination, file_object.etag)
marker = destination / file_object.etag
if marker.exists():
continue

file_destination = Path(destination, file_object.object_name.rsplit("/", 1)[1])
file_destination = destination / file_object.object_name.rsplit("/", 1)[1]
if (file_destination.parent / file_destination.stem).exists():
# Marker is missing but archive exists means the server archive changed, force a refresh
shutil.rmtree(file_destination.parent / file_destination.stem)
Expand Down