Skip to content

Commit a08219c

Browse files
committed
Fix MSCR 74267
Fix microsoft/vscode-internalbacklog#3140 Remove extra indexOf check This could cause failures for files such as `img..png`
1 parent 64bbfbf commit a08219c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/contrib/webview/browser/resourceLoading.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { VSBufferReadableStream } from 'vs/base/common/buffer';
77
import { CancellationToken } from 'vs/base/common/cancellation';
88
import { isUNC } from 'vs/base/common/extpath';
99
import { Schemas } from 'vs/base/common/network';
10-
import { sep } from 'vs/base/common/path';
10+
import { normalize, sep } from 'vs/base/common/path';
1111
import { URI } from 'vs/base/common/uri';
1212
import { FileOperationError, FileOperationResult, IFileService } from 'vs/platform/files/common/files';
1313
import { ILogService } from 'vs/platform/log/common/log';
@@ -103,8 +103,8 @@ function containsResource(root: URI, resource: URI): boolean {
103103
return false;
104104
}
105105

106-
let rootPath = root.fsPath + (root.fsPath.endsWith(sep) ? '' : sep);
107-
let resourceFsPath = resource.fsPath;
106+
let resourceFsPath = normalize(resource.fsPath);
107+
let rootPath = normalize(root.fsPath + (root.fsPath.endsWith(sep) ? '' : sep));
108108

109109
if (isUNC(root.fsPath) && isUNC(resource.fsPath)) {
110110
rootPath = rootPath.toLowerCase();

0 commit comments

Comments
 (0)