Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gzupanda
code-server
提交
a018e30d
C
code-server
项目概览
gzupanda
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
a018e30d
编写于
11月 23, 2020
作者:
A
Anmol Sethi
提交者:
GitHub
11月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2348 from cdr/userdata
Use file system for user data
上级
96170de1
fb835838
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
12 deletion
+13
-12
ci/dev/vscode.patch
ci/dev/vscode.patch
+13
-6
src/browser/pages/vscode.html
src/browser/pages/vscode.html
+0
-5
src/browser/pages/vscode.ts
src/browser/pages/vscode.ts
+0
-1
未找到文件。
ci/dev/vscode.patch
浏览文件 @
a018e30d
...
...
@@ -3797,18 +3797,25 @@ index 85d83f37da179a1e39266cf72a02e971f590308e..0659738b36df1747c9afcabf8d9abf26
};
diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts
index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..
cd589c6f75eccbeefbf364d426ac882396b26fb4
100644
index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..
8e122c761ac7ddfee11f9dda2ac5e845b893cc28
100644
--- a/src/vs/workbench/services/environment/browser/environmentService.ts
+++ b/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -119,8 +119,
18
@@
export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@@ -119,8 +119,
25
@@
export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@memoize
get logFile(): URI { return joinPath(this.options.logsPath, 'window.log'); }
+ // NOTE@coder: Use the regular path for extensions that write directly to disk
+ // instead of using the VS Code API.
+ // NOTE@coder: Use the same path in // ../../../../platform/environment/node/environmentService.ts
+ // and don't use the user data scheme. This solves two problems:
+ // 1. Extensions running in the browser (like Vim) might use these paths
+ // directly instead of using the file service and most likely can't write
+ // to `/User` on disk.
+ // 2. Settings will be stored in the file system instead of in browser
+ // storage. Using browser storage makes sharing or seeding settings
+ // between browsers difficult. We may want to revisit this once/if we get
+ // settings sync.
@memoize
- get userRoamingDataHome(): URI { return URI.file('/User').with({ scheme: Schemas.userData }); }
+ get userRoamingDataHome(): URI { return
URI.file(this.userDataPath).with({ scheme: Schemas.userData }
); }
+ get userRoamingDataHome(): URI { return
joinPath(URI.file(this.userDataPath).with({ scheme: Schemas.vscodeRemote }), 'User'
); }
+ @memoize
+ get userDataPath(): string {
+ const dataPath = this.payload?.get("userDataPath");
...
...
@@ -3820,7 +3827,7 @@ index a8d43045ecc8cbe04b3f8440cff16d42aadbcad0..cd589c6f75eccbeefbf364d426ac8823
@memoize
get settingsResource(): URI { return joinPath(this.userRoamingDataHome, 'settings.json'); }
@@ -301,7 +31
1
,12 @@
export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
@@ -301,7 +31
8
,12 @@
export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
extensionHostDebugEnvironment.params.port = parseInt(value);
break;
case 'enableProposedApi':
...
...
src/browser/pages/vscode.html
浏览文件 @
a018e30d
...
...
@@ -32,11 +32,6 @@
<link
rel=
"apple-touch-icon"
href=
"{{CS_STATIC_BASE}}/src/browser/media/pwa-icon-384.png"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<!-- Prefetch to avoid waterfall -->
<!-- PROD_ONLY
<link rel="prefetch" href="{{CS_STATIC_BASE}}/lib/vscode/node_modules/semver-umd/lib/semver-umd.js">
END_PROD_ONLY -->
<meta
id=
"coder-options"
data-settings=
"{{OPTIONS}}"
/>
</head>
...
...
src/browser/pages/vscode.ts
浏览文件 @
a018e30d
...
...
@@ -41,7 +41,6 @@ try {
"
xterm-addon-search
"
:
`../node_modules/xterm-addon-search/lib/xterm-addon-search.js`
,
"
xterm-addon-unicode11
"
:
`../node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`
,
"
xterm-addon-webgl
"
:
`../node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js`
,
"
semver-umd
"
:
`../node_modules/semver-umd/lib/semver-umd.js`
,
"
tas-client-umd
"
:
`../node_modules/tas-client-umd/lib/tas-client-umd.js`
,
"
iconv-lite-umd
"
:
`../node_modules/iconv-lite-umd/lib/iconv-lite-umd.js`
,
jschardet
:
`../node_modules/jschardet/dist/jschardet.min.js`
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录