Chromium Code Reviews| Index: build/linux/rewrite_dirs.py |
| =================================================================== |
| --- build/linux/rewrite_dirs.py (revision 39626) |
| +++ build/linux/rewrite_dirs.py (working copy) |
| @@ -20,7 +20,7 @@ |
| def RewritePath(path, sysroot): |
| """Rewrites a path by prefixing it with the sysroot if it is absolute.""" |
| - if os.path.isabs(path): |
| + if os.path.isabs(path) and not path.startswith(sysroot): |
| path = path.lstrip('/') |
| return os.path.join(sysroot, path) |
| else: |