diff --git a/dvc/fs/__init__.py b/dvc/fs/__init__.py index 98464e5908..b37731c97d 100644 --- a/dvc/fs/__init__.py +++ b/dvc/fs/__init__.py @@ -69,7 +69,9 @@ def download( to_infos = [to] if isinstance(fs, DVCFileSystem): - lfs_prefetch(fs, from_infos) + lfs_prefetch( + fs, [f"{fs.normpath(fs_path)}/**" if fs.isdir(fs_path) else fs_path] + ) cb.set_size(len(from_infos)) jobs = jobs or fs.jobs generic.copy(fs, from_infos, localfs, to_infos, callback=cb, batch_size=jobs)