mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 23:09:28 +01:00
tree: walk: operate on tree absolute root
This commit is contained in:
+2
-2
@@ -109,7 +109,7 @@ class GitTree(BaseTree):
|
||||
tree.abspath, ignore_file_handler=ignore_file_handler
|
||||
)
|
||||
dirs, nondirs = dvc_ignore_filter(tree.path, dirs, nondirs)
|
||||
yield os.path.normpath(tree.path), dirs, nondirs
|
||||
yield os.path.normpath(tree.abspath), dirs, nondirs
|
||||
|
||||
for i in dirs:
|
||||
for x in self._walk(
|
||||
@@ -121,7 +121,7 @@ class GitTree(BaseTree):
|
||||
yield x
|
||||
|
||||
if not topdown:
|
||||
yield os.path.normpath(tree.path), dirs, nondirs
|
||||
yield os.path.normpath(tree.abspath), dirs, nondirs
|
||||
|
||||
def walk(self, top, topdown=True, ignore_file_handler=None):
|
||||
"""Directory tree generator.
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ class WorkingTree(BaseTree):
|
||||
raise e
|
||||
|
||||
for root, dirs, files in dvc_walk(
|
||||
top,
|
||||
os.path.abspath(top),
|
||||
topdown=topdown,
|
||||
onerror=onerror,
|
||||
ignore_file_handler=ignore_file_handler,
|
||||
|
||||
Reference in New Issue
Block a user