提交 dd31f42c 编写于 作者: M Martin Aeschlimann

Normalize uri-paths before attempting to open them? Fixes #54990

上级 ce15d8c3
......@@ -37,7 +37,8 @@ import { normalizeNFC } from 'vs/base/common/normalization';
import URI from 'vs/base/common/uri';
import { Queue } from 'vs/base/common/async';
import { exists } from 'vs/base/node/pfs';
import { getComparisonKey, isEqual, hasToIgnoreCase } from 'vs/base/common/resources';
import { getComparisonKey, isEqual, hasToIgnoreCase, normalizePath } from 'vs/base/common/resources';
import { endsWith } from 'vs/base/common/strings';
enum WindowError {
UNRESPONSIVE,
......@@ -1016,6 +1017,11 @@ export class WindowsManager implements IWindowsMainService {
if (uri.scheme === Schemas.file) {
return this.parsePath(uri.fsPath, options);
}
// normalize URI
uri = normalizePath(uri);
if (endsWith(uri.path, '/')) {
uri = uri.with({ path: uri.path.substr(0, uri.path.length - 1) });
}
if (isFile) {
if (options && options.gotoLineMode) {
const parsedPath = parseLineAndColumnAware(uri.path);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册