Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: recipe_modules/path/api.py

Issue 2988583002: [path] Fix root path mocking. (Closed)
Patch Set: use real paths Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README.recipes.md ('k') | recipe_modules/path/examples/full.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/path/api.py
diff --git a/recipe_modules/path/api.py b/recipe_modules/path/api.py
index e290eb907f953c200ac8ebb6f76a688649e5a067..8492217ae42a1dcd3829a2786d2723ab9aa70a09 100644
--- a/recipe_modules/path/api.py
+++ b/recipe_modules/path/api.py
@@ -84,9 +84,10 @@ class path_set(object):
def add(self, path):
path = str(path)
self._initialize()
- while path:
+ prev_path = None
+ while path != prev_path:
self._paths.add(path)
- path = self._path_mod.dirname(path)
+ prev_path, path = path, self._path_mod.dirname(path)
def copy(self, source, dest):
source, dest = str(source), str(dest)
« no previous file with comments | « README.recipes.md ('k') | recipe_modules/path/examples/full.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698