Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
29af544a
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
29af544a
编写于
1月 09, 2018
作者:
D
Daniel Imms
提交者:
Joao Moreno
1月 10, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix url handling in Windows
上级
97932359
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
10 addition
and
6 deletion
+10
-6
src/vs/code/electron-main/launch.ts
src/vs/code/electron-main/launch.ts
+1
-2
src/vs/code/electron-main/main.ts
src/vs/code/electron-main/main.ts
+1
-1
src/vs/code/node/paths.ts
src/vs/code/node/paths.ts
+4
-0
src/vs/platform/environment/common/environment.ts
src/vs/platform/environment/common/environment.ts
+2
-1
src/vs/platform/environment/node/argv.ts
src/vs/platform/environment/node/argv.ts
+1
-1
src/vs/platform/url/electron-main/urlService.ts
src/vs/platform/url/electron-main/urlService.ts
+1
-1
未找到文件。
src/vs/code/electron-main/launch.ts
浏览文件 @
29af544a
...
...
@@ -105,8 +105,7 @@ export class LaunchService implements ILaunchService {
this
.
logService
.
trace
(
'
Received data from other instance:
'
,
args
,
userEnv
);
// Check early for open-url which is handled in URL service
const
openUrlArg
=
args
[
'
open-url
'
]
||
[];
const
openUrl
=
typeof
openUrlArg
===
'
string
'
?
[
openUrlArg
]
:
openUrlArg
;
const
openUrl
=
(
args
[
'
open-url
'
]
?
args
.
_urls
:
[])
||
[];
if
(
openUrl
.
length
>
0
)
{
openUrl
.
forEach
(
url
=>
this
.
urlService
.
open
(
url
));
...
...
src/vs/code/electron-main/main.ts
浏览文件 @
29af544a
...
...
@@ -66,7 +66,7 @@ function createServices(args: ParsedArgs): IInstantiationService {
services
.
set
(
IStateService
,
new
SyncDescriptor
(
StateService
));
services
.
set
(
IConfigurationService
,
new
SyncDescriptor
(
ConfigurationService
));
services
.
set
(
IRequestService
,
new
SyncDescriptor
(
RequestService
));
services
.
set
(
IURLService
,
new
SyncDescriptor
(
URLService
,
args
[
'
open-url
'
]));
services
.
set
(
IURLService
,
new
SyncDescriptor
(
URLService
,
args
[
'
open-url
'
]
?
args
.
_urls
:
[]
));
services
.
set
(
IBackupMainService
,
new
SyncDescriptor
(
BackupMainService
));
return
new
InstantiationService
(
services
,
true
);
...
...
src/vs/code/node/paths.ts
浏览文件 @
29af544a
...
...
@@ -15,6 +15,10 @@ import { ParsedArgs } from 'vs/platform/environment/common/environment';
import
{
realpathSync
}
from
'
vs/base/node/extfs
'
;
export
function
validatePaths
(
args
:
ParsedArgs
):
ParsedArgs
{
// Track URLs if they're going to be used
if
(
args
[
'
open-url
'
])
{
args
.
_urls
=
args
.
_
;
}
// Realpath/normalize paths and watch out for goto line mode
const
paths
=
doValidatePaths
(
args
.
_
,
args
.
goto
);
...
...
src/vs/platform/environment/common/environment.ts
浏览文件 @
29af544a
...
...
@@ -9,6 +9,7 @@ import { LogLevel } from 'vs/platform/log/common/log';
export
interface
ParsedArgs
{
[
arg
:
string
]:
any
;
_
:
string
[];
_urls
?:
string
[];
help
?:
boolean
;
version
?:
boolean
;
status
?:
boolean
;
...
...
@@ -42,7 +43,7 @@ export interface ParsedArgs {
'
install-extension
'
?:
string
|
string
[];
'
uninstall-extension
'
?:
string
|
string
[];
'
enable-proposed-api
'
?:
string
|
string
[];
'
open-url
'
?:
string
|
string
[]
;
'
open-url
'
?:
boolean
;
'
skip-getting-started
'
?:
boolean
;
'
sticky-quickopen
'
?:
boolean
;
'
disable-telemetry
'
?:
boolean
;
...
...
src/vs/platform/environment/node/argv.ts
浏览文件 @
29af544a
...
...
@@ -26,7 +26,6 @@ const options: minimist.Opts = {
'
debugBrkPluginHost
'
,
'
debugSearch
'
,
'
debugBrkSearch
'
,
'
open-url
'
,
'
enable-proposed-api
'
,
'
export-default-configuration
'
,
'
install-source
'
...
...
@@ -41,6 +40,7 @@ const options: minimist.Opts = {
'
new-window
'
,
'
unity-launch
'
,
'
reuse-window
'
,
'
open-url
'
,
'
performance
'
,
'
prof-startup
'
,
'
verbose
'
,
...
...
src/vs/platform/url/electron-main/urlService.ts
浏览文件 @
29af544a
...
...
@@ -25,7 +25,7 @@ export class URLService implements IURLService {
...
globalBuffer
];
app
.
setAsDefaultProtocolClient
(
product
.
urlProtocol
,
process
.
execPath
,
[
'
--open-url
'
]);
app
.
setAsDefaultProtocolClient
(
product
.
urlProtocol
,
process
.
execPath
,
[
'
--open-url
'
,
'
--
'
]);
const
rawOnOpenUrl
=
fromNodeEventEmitter
(
app
,
'
open-url
'
,
(
event
:
Electron
.
Event
,
url
:
string
)
=>
({
event
,
url
}));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录