Safer change for #25422

This commit is contained in:
Rob Lourens 2017-05-25 16:27:55 -07:00
parent 867468a559
commit ce18dd018d
2 changed files with 2 additions and 2 deletions

View file

@ -235,7 +235,7 @@ export class RipgrepParser extends EventEmitter {
this.onResult();
}
this.fileMatch = new FileMatch(path.resolve(this.rootFolder, r[1]));
this.fileMatch = new FileMatch(path.isAbsolute(r[1]) ? r[1] : path.join(this.rootFolder, r[1]));
} else {
// Line is empty (or malformed)
}

View file

@ -74,7 +74,7 @@ suite('RipgrepParser', () => {
assert.deepEqual(results[0],
<ISerializedFileMatch>{
numMatches: 2,
path: path.resolve(rootFolder, 'a.txt'),
path: path.join(rootFolder, 'a.txt'),
lineMatches: [
{
lineNumber: 0,