From 588b14b5bdff7594e38cebb32f60e2e669933868 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 17 Jan 2017 09:07:15 +0100 Subject: [PATCH] normalize path --- src/vs/workbench/api/node/extHostWorkspace.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 9777a755e78..901ac3c0b90 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -5,7 +5,7 @@ 'use strict'; import URI from 'vs/base/common/uri'; -// import { relative, isEqualOrParent } from 'vs/base/common/paths'; +import { normalize } from 'vs/base/common/paths'; import { relative } from 'path'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; @@ -40,15 +40,15 @@ export class ExtHostWorkspace { } if (!path || !this._workspacePath) { - return path; + return normalize(path); } let result = relative(this._workspacePath, path); if (!result || result.indexOf('..') === 0) { - return path; + return normalize(path); } - return result; + return normalize(result); } findFiles(include: string, exclude: string, maxResults?: number, token?: vscode.CancellationToken): Thenable {