mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
This commit is contained in:
parent
16997b315c
commit
1e38af3424
|
@ -120,6 +120,7 @@ import { NODE_REMOTE_RESOURCE_CHANNEL_NAME, NODE_REMOTE_RESOURCE_IPC_METHOD_NAME
|
|||
import { Lazy } from 'vs/base/common/lazy';
|
||||
import { IAuxiliaryWindowsMainService } from 'vs/platform/auxiliaryWindow/electron-main/auxiliaryWindows';
|
||||
import { AuxiliaryWindowsMainService } from 'vs/platform/auxiliaryWindow/electron-main/auxiliaryWindowsMainService';
|
||||
import { normalizeNFC } from 'vs/base/common/normalization';
|
||||
|
||||
/**
|
||||
* The main VS Code application. There will only ever be one instance,
|
||||
|
@ -435,6 +436,8 @@ export class CodeApplication extends Disposable {
|
|||
let macOpenFileURIs: IWindowOpenable[] = [];
|
||||
let runningTimeout: NodeJS.Timeout | undefined = undefined;
|
||||
app.on('open-file', (event, path) => {
|
||||
path = normalizeNFC(path); // macOS only: normalize paths to NFC form
|
||||
|
||||
this.logService.trace('app#open-file: ', path);
|
||||
event.preventDefault();
|
||||
|
||||
|
@ -1336,7 +1339,11 @@ export class CodeApplication extends Disposable {
|
|||
return windowsMainService.open({
|
||||
context: OpenContext.DOCK,
|
||||
cli: args,
|
||||
urisToOpen: macOpenFiles.map(path => (hasWorkspaceFileExtension(path) ? { workspaceUri: URI.file(path) } : { fileUri: URI.file(path) })),
|
||||
urisToOpen: macOpenFiles.map(path => {
|
||||
path = normalizeNFC(path); // macOS only: normalize paths to NFC form
|
||||
|
||||
return (hasWorkspaceFileExtension(path) ? { workspaceUri: URI.file(path) } : { fileUri: URI.file(path) });
|
||||
}),
|
||||
noRecentEntry,
|
||||
waitMarkerFileURI,
|
||||
initialStartup: true,
|
||||
|
|
Loading…
Reference in a new issue