Bug 1527286 - For 'mach clang-format' don't pass files that we don't exist on the disk. r=sylvestre

Differential Revision: https://phabricator.services.mozilla.com/D19481

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andi-Bogdan Postelnicu 2019-02-12 12:54:22 +00:00
Родитель 313155b999
Коммит 843d0d6fcf
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -2817,7 +2817,8 @@ class StaticAnalysis(MachCommandBase):
# Supported extension and accepted path
path_list.append(f_in_dir)
else:
if f.endswith(extensions):
# Make sure that the file exists and it has a supported extension
if os.path.isfile(f) and f.endswith(extensions):
path_list.append(f)
return path_list