[haiku-commits] Re: haiku: hrev50485 - in src: data/keyboard_layouts preferences/keymap

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 14 Aug 2016 22:00:18 +0200

On 08/14/2016 02:05 PM, Axel Dörfler wrote:

Am 13/08/2016 um 01:27 schrieb John Scipione:
On Fri, Aug 12, 2016 at 3:03 PM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
wrote:
That doesn't look right at all:
3) Since it uses file system order, they should already come ordered
"alphabetically", so adding them to the beginning should add them in
reverse
order. That's fishy.
Could there be a bug in GetNextRef() that the items are being returned
in reverse order?

No, it looks like that, unlike BFS, the packagefs returns the entries in
reverse order. This is not a bug, but could definitely be changed there.

packagefs returns the entries of a directory in the order they have been added to the directory, which happens package by package. So the entry order does not depend on their names. Changing that would require a slower (O(log(n) per access) data structure -- currently a doubly-linked list and a hash map are used.

CU, Ingo


Other related posts: