Skip to content

Commit 176a473

Browse files
authored
if a zip is expected do not unzip (#1868)
1 parent cb78946 commit 176a473

File tree

1 file changed

+4
-2
lines changed
  • services/sidecar/src/simcore_service_sidecar

1 file changed

+4
-2
lines changed

services/sidecar/src/simcore_service_sidecar/executor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ async def _process_task_input(self, port: node_ports.Port, input_ports: Dict):
166166
final_path,
167167
path,
168168
)
169-
# check if the file is a zip, in that case extract all
170-
if zipfile.is_zipfile(final_path):
169+
# check if the file is a zip, in that case extract all if the service does not expect a zip file
170+
if zipfile.is_zipfile(final_path) and (
171+
str(port.type) != "data:application/zip"
172+
):
171173
with zipfile.ZipFile(final_path, "r") as zip_obj:
172174
zip_obj.extractall(final_path.parents[0])
173175
# finally remove the zip archive

0 commit comments

Comments
 (0)