diff --git a/src/datachain/lib/dc.py b/src/datachain/lib/dc.py index 57a215eda..cad556cae 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]