Merge pull request #3268 from Suor/isdir

dvc: do not check for isdir on recursive out collect
This commit is contained in:
Ruslan Kuprieiev
2020-01-31 22:45:35 +02:00
committed by GitHub
+1 -2
View File
@@ -399,14 +399,13 @@ class Repo(object):
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