1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-11 10:15:46 +01:00

Speed up file completion a bit, with sorting off. Sort directories first, which slows it down with sorting on.

This commit is contained in:
Kris Maglione
2008-12-20 13:30:08 -05:00
parent 99ff01aac1
commit 911470e0a7
2 changed files with 27 additions and 29 deletions

View File

@@ -589,8 +589,7 @@ function IO() //{{{
while (entries.hasMoreElements())
{
let entry = entries.getNext();
entry.QueryInterface(Ci.nsIFile);
array.push(entry);
array.push(entry.QueryInterface(Ci.nsIFile));
}
if (sort)
return array.sort(function (a, b) b.isDirectory() - a.isDirectory() || String.localeCompare(a.path, b.path));