Skip to content

Commit

Permalink
Merge pull request #3268 from Suor/isdir
Browse files Browse the repository at this point in the history
dvc: do not check for isdir on recursive out collect
  • Loading branch information
efiop authored Jan 31, 2020
2 parents 2613e12 + 6545d21 commit 92bbd43
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 92bbd43

Please sign in to comment.