diff --git a/src/vs/workbench/contrib/webview/browser/resourceLoading.ts b/src/vs/workbench/contrib/webview/browser/resourceLoading.ts index 8ea2e07d78..8af5a8cc84 100644 --- a/src/vs/workbench/contrib/webview/browser/resourceLoading.ts +++ b/src/vs/workbench/contrib/webview/browser/resourceLoading.ts @@ -7,7 +7,7 @@ import { VSBufferReadableStream } from 'vs/base/common/buffer'; import { CancellationToken } from 'vs/base/common/cancellation'; import { isUNC } from 'vs/base/common/extpath'; import { Schemas } from 'vs/base/common/network'; -import { sep } from 'vs/base/common/path'; +import { normalize, sep } from 'vs/base/common/path'; import { URI } from 'vs/base/common/uri'; import { FileOperationError, FileOperationResult, IFileService } from 'vs/platform/files/common/files'; import { ILogService } from 'vs/platform/log/common/log'; @@ -103,8 +103,8 @@ function containsResource(root: URI, resource: URI): boolean { return false; } - let rootPath = root.fsPath + (root.fsPath.endsWith(sep) ? '' : sep); - let resourceFsPath = resource.fsPath; + let resourceFsPath = normalize(resource.fsPath); + let rootPath = normalize(root.fsPath + (root.fsPath.endsWith(sep) ? '' : sep)); if (isUNC(root.fsPath) && isUNC(resource.fsPath)) { rootPath = rootPath.toLowerCase();