提交 c681aad0 编写于 作者: J Johannes Rieken

add path sep info to json data

上级 171d255d
......@@ -384,8 +384,8 @@ export class URI implements UriComponents {
return data;
} else {
const result = new _URI(data);
result._fsPath = (<UriState>data).fsPath;
result._formatted = (<UriState>data).external;
result._fsPath = (<UriState>data).fsPathBsl === (isWindows || undefined) ? (<UriState>data).fsPath : null;
return result;
}
}
......@@ -401,8 +401,9 @@ export interface UriComponents {
interface UriState extends UriComponents {
$mid: number;
fsPath: string;
external: string;
fsPath: string;
fsPathBsl: true | undefined;
}
......@@ -438,6 +439,7 @@ class _URI extends URI {
// cached state
if (this._fsPath) {
res.fsPath = this._fsPath;
res.fsPathBsl = isWindows || undefined;
}
if (this._formatted) {
res.external = this._formatted;
......
......@@ -31,6 +31,7 @@ suite('ExtHostTypes', function () {
scheme: 'file',
path: '/path/test.file',
fsPath: '/path/test.file'.replace(/\//g, isWindows ? '\\' : '/'),
fsPathBsl: isWindows || undefined,
});
assert.ok(uri.toString());
......@@ -39,6 +40,7 @@ suite('ExtHostTypes', function () {
scheme: 'file',
path: '/path/test.file',
fsPath: '/path/test.file'.replace(/\//g, isWindows ? '\\' : '/'),
fsPathBsl: isWindows || undefined,
external: 'file:///path/test.file'
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册