add tree sorter

fixes #63148
This commit is contained in:
Joao Moreno
2018-12-14 15:35:28 +01:00
parent 3fc2c90836
commit 1c6050ce0d
8 changed files with 45 additions and 23 deletions

View File

@@ -46,14 +46,6 @@ async function readdir(relativePath) {
}
}
result.sort((a, b) => {
if (a.type === b.type) {
return a.name < b.name ? -1 : 1;
}
return a.type === 'dir' ? -1 : 1;
});
return result;
}