1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 15:54:12 +01:00

Trivial refactoring of io.readDirectory.

This commit is contained in:
Doug Kearns
2008-12-30 19:17:51 +11:00
parent 2828b47b65
commit ef34a5b71d
2 changed files with 4 additions and 4 deletions

View File

@@ -550,11 +550,12 @@ function IO() //{{{
array.push(entry.QueryInterface(Ci.nsIFile));
}
if (sort)
return array.sort(function (a, b) b.isDirectory() - a.isDirectory() || String.localeCompare(a.path, b.path));
array.sort(function (a, b) b.isDirectory() - a.isDirectory() || String.localeCompare(a.path, b.path));
return array;
}
else
return []; // XXX: or should it throw an error, probably yes?
// Yes --djk
},
// file is either a full pathname or an instance of file instanceof nsILocalFile