Fix #29801 - glob with correct path when testing sibling exclude expressions

This commit is contained in:
Rob Lourens 2017-06-28 21:39:14 -07:00
parent 26d28ca84e
commit 9541932481

View file

@ -74,8 +74,7 @@ export class RipgrepEngine {
this.ripgrepParser = new RipgrepParser(this.config.maxResults, cwd);
this.ripgrepParser.on('result', (match: ISerializedFileMatch) => {
if (this.postProcessExclusions) {
const relativePath = path.relative('/', match.path);
const handleResultP = (<TPromise<string>>this.postProcessExclusions(relativePath, undefined, () => getSiblings(match.path)))
const handleResultP = (<TPromise<string>>this.postProcessExclusions(match.path, undefined, () => getSiblings(match.path)))
.then(globMatch => {
if (!globMatch) {
onResult(match);