提交 a00275b3 编写于 作者: J Joao Moreno

Merge branch 'jordanmkasla2009-master'

......@@ -8,6 +8,7 @@
import { TPromise } from 'vs/base/common/winjs.base';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { assign } from 'vs/base/common/objects';
import URI from 'vs/base/common/uri';
import { IWindowsService } from 'vs/platform/windows/common/windows';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { shell, crashReporter, app } from 'electron';
......@@ -44,7 +45,7 @@ export class WindowsService implements IWindowsService, IDisposable {
) {
chain(urlService.onOpenURL)
.filter(uri => uri.authority === 'file' && !!uri.path)
.map(uri => uri.path)
.map(uri => URI.file(uri.fsPath))
.on(this.openFileForURI, this, this.disposables);
}
......@@ -301,9 +302,9 @@ export class WindowsService implements IWindowsService, IDisposable {
return TPromise.as(null);
}
private openFileForURI(filePath: string): TPromise<void> {
private openFileForURI(uri: URI): TPromise<void> {
const cli = assign(Object.create(null), this.environmentService.args, { goto: true });
const pathsToOpen = [filePath];
const pathsToOpen = [uri.fsPath];
this.windowsMainService.open({ context: OpenContext.API, cli, pathsToOpen });
return TPromise.as(null);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册