From 50cf27de54938406537dcb4ad4c3ee91ded82424 Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Fri, 20 Dec 2024 15:41:38 -0800 Subject: [PATCH] fix(listing): pick actually the smallest one to update --- src/datachain/lib/dc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/datachain/lib/dc.py b/src/datachain/lib/dc.py index 57a215eda..3817801a4 100644 --- a/src/datachain/lib/dc.py +++ b/src/datachain/lib/dc.py @@ -430,7 +430,7 @@ def parse_uri( if listings: if update: # choosing the smallest possible one to minimize update time - listing = sorted(listings, key=lambda ls: len(ls.name))[0] + listing = sorted(listings, key=lambda ls: len(ls.name), reverse=True)[0] else: # no need to update, choosing the most recent one listing = sorted(listings, key=lambda ls: ls.created_at)[-1] @@ -2388,6 +2388,7 @@ def export_files( signal="file", placement: FileExportPlacement = "fullpath", use_cache: bool = True, + anon: bool = False, ) -> None: """Method that exports all files from chain to some folder.""" if placement == "filename" and (