Skip to content

Commit

Permalink
fs: transfer: don't return on first exception
Browse files Browse the repository at this point in the history
Regression from #180
  • Loading branch information
efiop committed Feb 28, 2023
1 parent ebc1e3e commit a0a1739
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dvc_objects/fs/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def transfer(
# copy, the remaining copy operations will be batched.
for i, (from_p, to_p) in enumerate(zip(from_path, to_path)):
if links[0] == "copy":
return copy(
copy(
from_fs,
from_path[i:],
to_fs,
Expand All @@ -302,6 +302,7 @@ def transfer(
batch_size=batch_size,
on_error=on_error,
)
continue
try:
_try_links(
links,
Expand All @@ -325,7 +326,7 @@ def transfer(
and isinstance(exc.__context__, FileExistsError)
):
logger.debug("'%s' file already exists, skipping", to_path)
return None
continue

if on_error is not None:
on_error(from_p, to_p, exc)
Expand Down

0 comments on commit a0a1739

Please sign in to comment.