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

Unified Diff: scripts/common/chromium_utils.py

Issue 2061213002: remote_run: use /b as base directory for temporary files when available (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 6 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 | « no previous file | scripts/slave/remote_run.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/common/chromium_utils.py
diff --git a/scripts/common/chromium_utils.py b/scripts/common/chromium_utils.py
index 8dd27ef8adf9ea913501b72ad6583b6c2da2d10b..75822b7b74787137aa38f766d0d5b9b238467d22 100644
--- a/scripts/common/chromium_utils.py
+++ b/scripts/common/chromium_utils.py
@@ -812,9 +812,10 @@ def FindUpwardParent(start_dir, *desired_list):
(desired_path, start_dir))
found_path = os.path.join(cur_dir, desired_path)
# Strip the entire original desired path from the end of the one found
- # and remove a trailing path separator, if present.
+ # and remove a trailing path separator, if present (unless it's
+ # filesystem/drive root).
found_path = found_path[:len(found_path) - len(desired_path)]
- if found_path.endswith(os.sep):
+ if found_path.endswith(os.sep) and os.path.dirname(found_path) != found_path:
estaab 2016/06/14 16:57:36 This changes the behavior of this function so if s
Paweł Hajdan Jr. 2016/06/15 07:59:10 Yup. FWIW, Windows might also be funny - I'll defi
found_path = found_path[:len(found_path) - 1]
return found_path
« no previous file with comments | « no previous file | scripts/slave/remote_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698