Fix "poster" dataset extraction (#3164)

Co-authored-by: Martin Mokry <martin-kokos@users.noreply.github.com>
Co-authored-by: maturk <30566358+maturk@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2024-05-24 15:12:44 +03:00
1 parent ee4c18a407
commit 5a341eac2c
1 file changed
+1
@@ -171,6 +171,7 @@ def download_capture_name(save_dir: Path, dataset_name: str, capture_name: str,
with zipfile.ZipFile(download_path, "r") as zip_ref:
zip_ref.extractall(tmp_path)
inner_folders = os.listdir(tmp_path)
inner_folders = [folder for folder in inner_folders if folder != "__MACOSX"]
assert len(inner_folders) == 1, f"There is more than one folder inside this zip file: {inner_folders}"
folder = os.path.join(tmp_path, inner_folders[0])
shutil.rmtree(target_path)