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]: