Skip to content

Commit

Permalink
fix(listing): pick actually the smallest one to update
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein committed Dec 20, 2024
1 parent 8391d4e commit 50cf27d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/datachain/lib/dc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit 50cf27d

Please sign in to comment.