Remix.run Logo
joshdavham 6 days ago

This is awesome! Does anyone else wanna share some of the cursed knowledge they've picked up?

For me, MacOS file names are cursed:

1. Filenames in MacOS are case-INsensitive, meaning file.txt and FILE.txt are equivalent

2. Filenames in MacOS, when saved in NFC, may be converted to NFD

archagon 5 days ago | parent | next [-]

I'm in the process of writing up a blog post on how network shares on macOS are kind of cursed. Highlights:

* Files on SMB shares sometimes show up as "NDH6SA~M" or similar, even though that's not their filename on the actual network drive. This is because there's some character present in the filename that SMB can't work with. No errors or anything, you just have to know about it.

* SMB seems to copy accented characters in filenames as two Unicode code points, not one. Whereas native macOS filenames tend to use single Unicode code point accents.

* SMB seems to munge and un-munge certain special characters in filenames into placeholders, e.g. * <-> . But not always. Maybe this depends on the SMB version used?

* SMB (of a certain version?) stores symlinks as so-called "XSym" binary files, which automatically get converted back to native symlinks when copied from the network share. But if you try to rsync directly from the network drive instead of going through SMB, you'll end up with a bunch of binary XSym file that you can't really do anything with.

I only found out about these issues through integrity checks that showed supposedly missing files. Horrible!

qingcharles 6 days ago | parent | prev | next [-]

I created one of the first CDDBs in 1995 when Windows 95 was in beta. It came with a file, IIRC, cdplayer.ini, that contained all the track names you'd typed in from your CDs.

I put out requests across the Net, mostly Usenet at the time, and people sent me their track listings and I would put out a new file every day with the new additions.

Until I hit 64KB which is the max size of an .ini file under Windows, I guess. And that was the end of that project.

account42 3 days ago | parent | prev | next [-]

> 1. Filenames in MacOS are case-INsensitive, meaning file.txt and FILE.txt are equivalent

It's much more cursed than that: filenames may or may not be case-sensitive depending on the filesystem.

burnt-resistor 6 days ago | parent | prev | next [-]

Yep. Create a case-sensitive APFS or HFS+ volume for system or data, and it guarantees problems.

nothrabannosir 6 days ago | parent [-]

I’ve done this with my main drive for the last ten or so years and run into not a single problem. I recommend it.

burnt-resistor 6 days ago | parent [-]

Then you don't use Time Machine, Migration Assistant, cmake, or a host of other development and systems tools that don't work correctly on case-sense APFS volumes.

Sorry, but this is terrible advice unsuitable for all audiences. It might seem to work for now but it's walking in a minefield of nonstandard configuration that could bite anytime in the future.

https://forums.macrumors.com/threads/does-anyone-else-use-a-...

https://forums.macrumors.com/threads/heads-up-currently-impo...

https://apple.stackexchange.com/questions/474537/time-machin...

https://gitlab.kitware.com/cmake/cmake/-/issues/26333

nothrabannosir 6 days ago | parent [-]

I did use Time Machine, but thankfully wised up and left for restic instead. Using Time Machine is worse advice than case insensitive filesystem if you ask me. Inscrutable logs and silent failures.

I’m sure there are those who found problems, but fact remains that in ten years I never have. What I have found is a lot of warnings against it by people who don’t use it themselves, like the person in the second link.

I recommend it, and the more people use it, the more people can help fix bugs they encounter (if any?) like in that last link you posted.

PS the Time Machine error in your third link is apparently about a CI source to a CS target. I hope it’s fair to say: don’t do that?

mdaniel 6 days ago | parent | prev [-]

1 is only true by default, both HFS and APFS have case sensitive options . NTFS also behaves like you described, and I believe the distinction is that the filesystems are case-retentive, so this will work fine:

  $ echo yup > README.txt
  $ cat ReAdMe.TXT
  yup
  $ ls
  README.txt
Maybe the cursed version of the filesystem story is that goddamn Steam refuses to install on the case sensitive version of the filesystem, although Steam has a Linux version. Asshats