diff --git a/antarest/study/storage/utils.py b/antarest/study/storage/utils.py index d6cdd07192..3c9ee5d901 100644 --- a/antarest/study/storage/utils.py +++ b/antarest/study/storage/utils.py @@ -396,10 +396,15 @@ def export_study_flat( if output_list_filter is not None: os.mkdir(output_dest_path) for output in output_list_filter: - shutil.copytree( - src=output_src_path / output, - dst=output_dest_path / output, - ) + zip_path = output_src_path / f"{output}.zip" + if zip_path.exists(): + with ZipFile(zip_path) as zf: + zf.extractall(output_dest_path / output) + else: + shutil.copytree( + src=output_src_path / output, + dst=output_dest_path / output, + ) else: shutil.copytree( src=output_src_path, diff --git a/tests/storage/integration/test_exporter.py b/tests/storage/integration/test_exporter.py index 78709e69f2..355d5bf462 100644 --- a/tests/storage/integration/test_exporter.py +++ b/tests/storage/integration/test_exporter.py @@ -100,7 +100,9 @@ def test_exporter_file_no_output( @pytest.mark.parametrize("outputs", [True, False, "prout"]) -@pytest.mark.parametrize("output_list", [None, [], ["20201014-1427eco"]]) +@pytest.mark.parametrize( + "output_list", [None, [], ["20201014-1427eco"], ["20201014-1430adq-2"]] +) @pytest.mark.parametrize("denormalize", [True, False]) def test_export_flat( tmp_path: Path,