Skip to content

List catalog folders in HFS catalog order - #45

Merged
colemancda merged 7 commits into
masterfrom
feature/catalog-order
Dec 1, 2026
Merged

colemancda merged 7 commits into
masterfrom
feature/catalog-order

Conversation

@colemancda

@colemancda colemancda commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Makes indexed listings follow HFS catalog order, verified against a real HFS volume on Mac OS 9.2.2.

Changes

  • Catalog volumes: SnapshotCatalog sorts each folder's items by RelString, case-insensitive and diacritic-sensitive, when the catalog is built. contents(ofFolder:), item(at:inFolder:) and indexed PBGetCatInfo then follow HFS order whatever order the host listed items in.
  • POSIX volumes: indexed PBGetCatInfo walks folders in the same order, by each item's Mac (FSSpec) name.

Checked against real HFS

ReferenceTests/Retro68/CatalogOrderCapture.c creates two folders on an HFS volume in the Mac OS 9.2.2 VM, lists them with indexed PBGetCatInfo, and deletes them. The listing is checked in as CatalogOrder-macos-9.2.2-ppc.bin.

  • HFS listed all 237 names in strictly increasing RelString order, so its catalog comparison agrees with RelString on every name tried.
  • Of the 254 one-byte names, HFS kept exactly 214: one per class EqualString finds equal with case ignored.
  • Numbers sort as text: File10 comes before File2.

Tests

CatalogOrderTests build catalogs from the captured names in reverse order and require the captured listing back, and walk a POSIX folder by index. All package tests pass.

@colemancda
colemancda force-pushed the feature/catalog-order branch from 9e59ede to 6aed575 Compare December 1, 2026 02:46
@colemancda
colemancda merged commit a9d0805 into master Dec 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant