Skip to content

Commit 9151f2a

Browse files
import: fix broken progressbar when importing folder
Add child progress bar to dvc fs to report directory import progress correctly. Fixes #10677
1 parent b2a873d commit 9151f2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dvc/fs/dvc.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,10 @@ def get_file(arg: tuple[FileSystem, tuple[str, str, Optional[dict]]]):
578578
kw = kwargs
579579
if isinstance(fs, DataFileSystem):
580580
kw = kw | {"info": info}
581-
return fs.get_file(src, dest, callback=callback, **kw)
581+
with callback.branched(src, dest) as child:
582+
file = fs.get_file(src, dest, callback=child, **kw)
583+
callback.relative_update()
584+
return file
582585

583586
if batch_size == 1:
584587
ctx: AbstractContextManager = nullcontext()

0 commit comments

Comments
 (0)