Skip to content

Commit b91adad

Browse files
committed
Fix file ordering issue in simple file picker
1 parent 84b046c commit b91adad

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/vs/workbench/services/dialogs/electron-browser/remoteFileDialog.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,9 @@ export class RemoteFileDialog {
468468
if (i1.isFolder !== i2.isFolder) {
469469
return i1.isFolder ? -1 : 1;
470470
}
471-
return i1.label.localeCompare(i2.label);
471+
const trimmed1 = this.endsWithSlash(i1.label) ? i1.label.substr(0, i1.label.length - 1) : i1.label;
472+
const trimmed2 = this.endsWithSlash(i2.label) ? i2.label.substr(0, i2.label.length - 1) : i2.label;
473+
return trimmed1.localeCompare(trimmed2);
472474
});
473475

474476
if (backDir) {

0 commit comments

Comments
 (0)