Enthusiast
Enthusiast

HGFS vs OSX 10.13 High Sierra's APFS -- file sort order

tl;dr = HFS to APFS change = different sort order

Windows guest here. Maps a OSX host directory.

Open e.g. cmd.exe and dir the mapped directory.

OSX 10.12 with HFS results in "sorted by name".

OSX 10.13 with APFS results in "native/random".

Q for VMware: how to get "sorted by name" back?

(This affects both, Fusion 8.5.8 and Fusion 10.0.)

added affected Fusion versions

0 Kudos
3 Replies
Enthusiast
Enthusiast

meh... yup, looks like APFS is the culprit here

Frequently Asked Questions

  • Calling readdir(2) on a directory in APFS returns filenames in hash order, whereas HFS+ returns filenames in lexicographical order.

reader doesn't promise a specific order

so technically this is working as intended

still... it breaks quite a few programs, apparently... and fixing all of those seems less hopeful than addressing it at e.g. the single HGFS choke point

grr, bad Apple  Smiley Sad

0 Kudos
Community Manager
Community Manager

Thanks for reporting this, we'll investigate and make sure we're doing the right thing.

- Michael Roy - Product Line Manager: Fusion & Workstation
0 Kudos

Sorry but this is not “bad Apple”.

The POSIX specs for readdir do not specify or guarantee the order in which directory entries are returned.  If you also look at the Linux man page for readdir, it says the same thing.

Programs are broken if they assume that the entries are returned in a given order.

0 Kudos