domain-substitution: exclude LICENSE files from substitution

This commit is contained in:
jj
2025-07-25 11:45:33 +00:00
parent d591df2fac
commit f67127450a
2 changed files with 6 additions and 6 deletions

View File

@@ -114,6 +114,8 @@ DOMAIN_EXCLUDE_PREFIXES = [
'third_party/blink/renderer/core/dom/document.cc',
# Exclusion to allow download of sysroots
'build/linux/sysroot_scripts/sysroots.json',
# Licenses and credits
'tools/licenses/licenses.py',
]
# pylint: enable=line-too-long
@@ -244,6 +246,10 @@ def should_domain_substitute(path, relative_path, search_regex, used_dep_set, us
if relative_path_posix.startswith(exclude_prefix):
used_dep_set.add(exclude_prefix)
return False
# Skip LICENSE.* files so that they remain untouched.
for license_path in ['license', 'license.txt', 'license.html']:
if relative_path_posix.endswith('/' + license_path):
return False
return _check_regex_match(path, search_regex)
return False