mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1659615 - handle the fact Windows Defender might have exclusions on different disks. r=mhentges,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87382
This commit is contained in:
parent
7f71e11e00
commit
b0ffe6a42b
@ -126,9 +126,13 @@ def is_windefender_affecting_srcdir(srcdir):
|
||||
srcdir = os.path.normcase(os.path.abspath(srcdir))
|
||||
for exclusion_path in get_windefender_exclusion_paths():
|
||||
exclusion_path = os.path.normcase(os.path.abspath(exclusion_path))
|
||||
if os.path.commonpath([exclusion_path, srcdir]) == exclusion_path:
|
||||
# exclusion_path is an ancestor of srcdir
|
||||
return False
|
||||
try:
|
||||
if os.path.commonpath([exclusion_path, srcdir]) == exclusion_path:
|
||||
# exclusion_path is an ancestor of srcdir
|
||||
return False
|
||||
except ValueError:
|
||||
# ValueError: Paths don't have the same drive - can't be ours
|
||||
pass
|
||||
return True
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user