Skip to content

Commit b225e2c

Browse files
author
Andrei Neagu
committed
fixed issues with prunning folder
1 parent 8263a5b commit b225e2c

File tree

1 file changed

+3
-1
lines changed
  • services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules

1 file changed

+3
-1
lines changed

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/nodeports.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ async def _get_data_from_port(
276276
archive_files: set[Path]
277277

278278
if _is_zip_file(downloaded_file):
279+
prunable_folder = PrunableFolder(final_path.parent)
279280
with log_context(
280281
_logger,
281282
logging.DEBUG,
@@ -294,6 +295,7 @@ async def _get_data_from_port(
294295
else:
295296
# move archive to directory as is
296297
final_path = final_path / downloaded_file.name
298+
prunable_folder = PrunableFolder(final_path.parent)
297299

298300
with log_context(
299301
_logger, logging.DEBUG, f"moving {downloaded_file} to {final_path}"
@@ -305,7 +307,7 @@ async def _get_data_from_port(
305307

306308
# NOTE: after the port content changes, make sure old files
307309
# which are no longer part of the port, are removed
308-
PrunableFolder(final_path).prune(exclude=archive_files)
310+
prunable_folder.prune(exclude=archive_files)
309311
else:
310312
transferred_bytes = sys.getsizeof(port_data)
311313

0 commit comments

Comments
 (0)