From 6545d2178ba16bd894498e0f454732ddf5535926 Mon Sep 17 00:00:00 2001 From: Alexander Schepanovski Date: Fri, 31 Jan 2020 19:36:36 +0700 Subject: [PATCH] dvc: do not check for isdir on recursive out collect The things is we create dirs as needed, so if outs are not checked out a directory contraining nothing but outs may be absent. --- dvc/repo/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 581f8bfef8..9bdb04cd76 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -399,14 +399,13 @@ def find_outs_by_path(self, path, outs=None, recursive=False, strict=True): abs_path = os.path.abspath(path) path_info = PathInfo(abs_path) - is_dir = self.tree.isdir(abs_path) match = path_info.__eq__ if strict else path_info.isin_or_eq def func(out): if out.scheme == "local" and match(out.path_info): return True - if is_dir and recursive and out.path_info.isin(path_info): + if recursive and out.path_info.isin(path_info): return True return False