提交 68f66cc8 编写于 作者: D Dmitry Zabello 提交者: Benjamin Pasero

Sort by type doesn't affect folders (#30572)

上级 01bea3df
......@@ -560,7 +560,6 @@ export class FileSorter implements ISorter {
// Sort Directories
switch (this.sortOrder) {
case 'default':
case 'type':
case 'modified':
if (statA.isDirectory && !statB.isDirectory) {
return -1;
......@@ -572,6 +571,21 @@ export class FileSorter implements ISorter {
break;
case 'type':
if (statA.isDirectory && !statB.isDirectory) {
return -1;
}
if (statB.isDirectory && !statA.isDirectory) {
return 1;
}
if (statA.isDirectory && statB.isDirectory) {
return comparers.compareFileNames(statA.name, statB.name);
}
break;
case 'filesFirst':
if (statA.isDirectory && !statB.isDirectory) {
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册