VMware Communities
nobody456
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
nobody456
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
Mikero
Community Manager
Community Manager

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

-
Michael Roy - Product Marketing Engineer: VCF
0 Kudos
Technogeezer
Immortal
Immortal

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.

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos