Bug 1410969 - Properly resolve wildcards in `mach file-info`; r=ahal

I likely regressed this as part of e9416a307987 (bug 1397406).

Before this change, '*' in filenames didn't work.

MozReview-Commit-ID: 33m83H6UTZ

--HG--
extra : rebase_source : 5732cd2b7f4851c6cd564c8dcbd7d303fbad570b
This commit is contained in:
Gregory Szorc 2017-10-23 10:49:55 -07:00
Родитель a56fef0fd4
Коммит 1ac035d512
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -187,7 +187,11 @@ class MozbuildFileCommands(MachCommandBase):
if rev: if rev:
raise InvalidPathException('cannot use wildcard in version control mode') raise InvalidPathException('cannot use wildcard in version control mode')
for path, f in reader.finder.find(p): # finder is rooted at / for now.
# TODO bug 1171069 tracks changing to relative.
search = mozpath.join(self.topsrcdir, p)[1:]
for path, f in reader.finder.find(search):
path = path[len(self.topsrcdir):]
if path not in all_paths_set: if path not in all_paths_set:
all_paths_set.add(path) all_paths_set.add(path)
allpaths.append(path) allpaths.append(path)