Chromium Code Reviews| 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 |