commit | 15a9e88a168b48963d74654cd7c10778895d2679 | [log] [tgz] |
---|---|---|
author | Shimi Zhang <[email protected]> | Fri Jan 21 23:53:16 2022 |
committer | Chromium LUCI CQ <[email protected]> | Fri Jan 21 23:53:16 2022 |
tree | e515bfd8ac34b25afa0ff5ac9dbcd684f9bd407f | |
parent | 10fb704544af0522602a2c7e48c8276c61870ce1 [diff] [blame] |
PRESUBMIT: Fix file path issue for the security OWNERS check We should use AbsoluteLocalPath() instead of LocalPath() for actual file access. See comment https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;drc=7592e0a6234db98620e4243802da7d16fd2aadde;l=935 See more analysis in the attached crbug. Bug: 1289770 Change-Id: I266b633368651ae5b4a05a2a2b616b7cd5a8efe7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3405424 Reviewed-by: Dirk Pranke <[email protected]> Reviewed-by: Xiaohan Wang <[email protected]> Commit-Queue: Shimi Zhang <[email protected]> Cr-Commit-Position: refs/heads/main@{#962153}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index a301154..fdc67e7d 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py
@@ -2767,7 +2767,7 @@ def AddPatternToCheck(input_file, pattern): owners_file = input_api.os_path.join( - input_api.os_path.dirname(input_file.LocalPath()), 'OWNERS') + input_api.os_path.dirname(input_file.AbsoluteLocalPath()), 'OWNERS') if owners_file not in to_check: to_check[owners_file] = {} if pattern not in to_check[owners_file]: