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
meh... yup, looks like APFS is the culprit here
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
Thanks for reporting this, we'll investigate and make sure we're doing the right thing.
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.