Skip to content

Commit 6f0c616

Browse files
get best match
1 parent a090109 commit 6f0c616

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/storage/src/simcore_service_storage/simcore_s3_dsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def _get_subpath(path: str, levels: int):
553553
is_directory=True,
554554
sha256_checksum=None,
555555
):
556-
parent_dir_fmd = parent_dir_fmds[0]
556+
parent_dir_fmd = max(parent_dir_fmds, key=lambda fmd: len(fmd.file_id))
557557
parent_dir_fmd.file_size = UNDEFINED_SIZE
558558
await db_file_meta_data.upsert(conn, parent_dir_fmd)
559559

0 commit comments

Comments
 (0)