Skip to content

Commit

Permalink
dvc: do not check for isdir on recursive out collect
Browse files Browse the repository at this point in the history
The things is we create dirs as needed, so if outs are not checked out a
directory contraining nothing but outs may be absent.
  • Loading branch information
Suor committed Jan 31, 2020
1 parent d864caf commit 6545d21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dvc/repo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6545d21

Please sign in to comment.