mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 07:15:54 +01:00
Normalize uri-paths before attempting to open them? Fixes #54990
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user