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