Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
daed3bb1
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,发现更多精彩内容 >>
未验证
提交
daed3bb1
编写于
6月 11, 2020
作者:
J
Johannes Rieken
提交者:
GitHub
6月 11, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #99675 from microsoft/joh/extUriUnBiased
Unbiased uri utils
上级
b6893ad2
223a7dcd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
23 deletion
+23
-23
src/vs/base/common/resources.ts
src/vs/base/common/resources.ts
+22
-22
src/vs/workbench/services/userData/common/fileUserDataProvider.ts
...orkbench/services/userData/common/fileUserDataProvider.ts
+1
-1
未找到文件。
src/vs/base/common/resources.ts
浏览文件 @
daed3bb1
...
...
@@ -8,7 +8,7 @@ import * as paths from 'vs/base/common/path';
import
{
URI
,
uriToFsPath
}
from
'
vs/base/common/uri
'
;
import
{
equalsIgnoreCase
,
compare
as
strCompare
}
from
'
vs/base/common/strings
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
is
Linux
,
isWindows
}
from
'
vs/base/common/platform
'
;
import
{
is
Windows
,
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
CharCode
}
from
'
vs/base/common/charCode
'
;
import
{
ParsedExpression
,
IExpression
,
parse
}
from
'
vs/base/common/glob
'
;
import
{
TernarySearchTree
}
from
'
vs/base/common/map
'
;
...
...
@@ -313,6 +313,12 @@ export class ExtUri implements IExtUri {
}
}
export
const
extUriBiasedIgnorePathCase
=
new
ExtUri
(
uri
=>
{
// A file scheme resource is in the same platform as code, so ignore case for non linux platforms
// Resource can be from another platform. Lowering the case as an hack. Should come from File system provider
return
uri
.
scheme
===
Schemas
.
file
?
!
isLinux
:
true
;
});
/**
* Unbiased utility that takes uris "as they are". This means it can be interchanged with
* uri#toString() usages. The following is true
...
...
@@ -331,28 +337,22 @@ export const extUri = new ExtUri(() => false);
*/
export
const
extUriIgnorePathCase
=
new
ExtUri
(
_
=>
true
);
const
exturiBiasedIgnorePathCase
=
new
ExtUri
(
uri
=>
{
// A file scheme resource is in the same platform as code, so ignore case for non linux platforms
// Resource can be from another platform. Lowering the case as an hack. Should come from File system provider
return
uri
&&
uri
.
scheme
===
Schemas
.
file
?
!
isLinux
:
true
;
});
export
const
isEqual
=
exturiBiasedIgnorePathCase
.
isEqual
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
isEqualOrParent
=
exturiBiasedIgnorePathCase
.
isEqualOrParent
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
getComparisonKey
=
exturiBiasedIgnorePathCase
.
getComparisonKey
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
basenameOrAuthority
=
exturiBiasedIgnorePathCase
.
basenameOrAuthority
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
basename
=
exturiBiasedIgnorePathCase
.
basename
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
extname
=
exturiBiasedIgnorePathCase
.
extname
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
dirname
=
exturiBiasedIgnorePathCase
.
dirname
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
isEqual
=
extUri
.
isEqual
.
bind
(
extUri
);
export
const
isEqualOrParent
=
extUri
.
isEqualOrParent
.
bind
(
extUri
);
export
const
getComparisonKey
=
extUri
.
getComparisonKey
.
bind
(
extUri
);
export
const
basenameOrAuthority
=
extUri
.
basenameOrAuthority
.
bind
(
extUri
);
export
const
basename
=
extUri
.
basename
.
bind
(
extUri
);
export
const
extname
=
extUri
.
extname
.
bind
(
extUri
);
export
const
dirname
=
extUri
.
dirname
.
bind
(
extUri
);
export
const
joinPath
=
extUri
.
joinPath
.
bind
(
extUri
);
export
const
normalizePath
=
ext
uriBiasedIgnorePathCase
.
normalizePath
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
relativePath
=
ext
uriBiasedIgnorePathCase
.
relativePath
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
resolvePath
=
ext
uriBiasedIgnorePathCase
.
resolvePath
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
isAbsolutePath
=
ext
uriBiasedIgnorePathCase
.
isAbsolutePath
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
isEqualAuthority
=
ext
uriBiasedIgnorePathCase
.
isEqualAuthority
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
hasTrailingPathSeparator
=
ext
uriBiasedIgnorePathCase
.
hasTrailingPathSeparator
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
removeTrailingPathSeparator
=
ext
uriBiasedIgnorePathCase
.
removeTrailingPathSeparator
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
addTrailingPathSeparator
=
ext
uriBiasedIgnorePathCase
.
addTrailingPathSeparator
.
bind
(
exturiBiasedIgnorePathCase
);
export
const
normalizePath
=
ext
Uri
.
normalizePath
.
bind
(
extUri
);
export
const
relativePath
=
ext
Uri
.
relativePath
.
bind
(
extUri
);
export
const
resolvePath
=
ext
Uri
.
resolvePath
.
bind
(
extUri
);
export
const
isAbsolutePath
=
ext
Uri
.
isAbsolutePath
.
bind
(
extUri
);
export
const
isEqualAuthority
=
ext
Uri
.
isEqualAuthority
.
bind
(
extUri
);
export
const
hasTrailingPathSeparator
=
ext
Uri
.
hasTrailingPathSeparator
.
bind
(
extUri
);
export
const
removeTrailingPathSeparator
=
ext
Uri
.
removeTrailingPathSeparator
.
bind
(
extUri
);
export
const
addTrailingPathSeparator
=
ext
Uri
.
addTrailingPathSeparator
.
bind
(
extUri
);
//#endregion
...
...
src/vs/workbench/services/userData/common/fileUserDataProvider.ts
浏览文件 @
daed3bb1
...
...
@@ -7,7 +7,7 @@ import { Event, Emitter } from 'vs/base/common/event';
import
{
Disposable
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IFileSystemProviderWithFileReadWriteCapability
,
IFileChange
,
IWatchOptions
,
IStat
,
FileOverwriteOptions
,
FileType
,
FileWriteOptions
,
FileDeleteOptions
,
FileSystemProviderCapabilities
,
IFileSystemProviderWithOpenReadWriteCloseCapability
,
FileOpenOptions
,
hasReadWriteCapability
,
hasOpenReadWriteCloseCapability
,
IFileSystemProviderWithFileReadStreamCapability
,
FileReadStreamOptions
,
hasFileReadStreamCapability
}
from
'
vs/platform/files/common/files
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
*
as
resources
from
'
vs/base/common/resources
'
;
import
{
extUriBiasedIgnorePathCase
as
resources
}
from
'
vs/base/common/resources
'
;
import
{
startsWith
}
from
'
vs/base/common/strings
'
;
import
{
BACKUPS
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录