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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user