aboutsummaryrefslogtreecommitdiff
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorChristoffer Jansson <jansson@webrtc.org>2022-02-11 21:29:38 +0100
committerWebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-02-12 16:08:35 +0000
commit884e8ae64064e9dcae5544b99053d33070b77c7f (patch)
treeec184844242c837da0c11c4dbaeeb869996aac51 /PRESUBMIT.py
parent075db397562d14e8bd472428763d50b5e8e9c17e (diff)
downloadwebrtc-884e8ae64064e9dcae5544b99053d33070b77c7f.tar.gz
Escape windows specific paths generated by os.path.join so that it works with regex.
Note that this will work on all platforms but is critical for windows due to the use backslash in the filesystem. Bug: webrtc:13607 Change-Id: Ie9a9987f1382133792c85820d38b770fadc0fff5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251442 Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Christoffer Jansson <jansson@google.com> Cr-Commit-Position: refs/heads/main@{#35982}
Diffstat (limited to 'PRESUBMIT.py')
-rwxr-xr-xPRESUBMIT.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index acc3110e7b..ed4e14190f 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1231,9 +1231,8 @@ def CheckOrphanHeaders(input_api, output_api, source_file_filter):
# eval-ed and thus doesn't have __file__.
error_msg = """{} should be listed in {}."""
results = []
- exempt_paths = [
- os.path.join('tools_webrtc', 'ios', 'SDK'),
- ]
+ exempt_paths = [re.escape(os.path.join('tools_webrtc', 'ios', 'SDK'))]
+
with _AddToPath(
input_api.os_path.join(input_api.PresubmitLocalPath(), 'tools_webrtc',
'presubmit_checks_lib')):