11 ms·
A lot of them are interesting points, but I am not sure I agree with the complaint the file system is case sensitive. That's how it should be and I am annoyed
by coolgoose 2y ago
A lot of them are interesting points, but I am not sure I agree with the complaint the file system is case sensitive.
That's how it should be and I am annoyed at macos for not having it.
- yencabulator 2y agoIt would be incredibly weird not to be able to store urlsafe-base64 encoded paths on S3.
- ansgri 2y agoTIL. I've switched to Mac about a year ago and it's sufficiently Linux-like to take such things for granted. I wonder what other surprises are going to bite me in the future.
- aldanor 2y agoSufficiently BSD-like :)
- sholladay 2y agomacOS is case preserving, though. To me, it’s the best of both worlds. You can stylize your file names and they will be respected, but you don’t have to remember how they are stylized when you are searching for or processing them because search is case insensitive.
- smt88 2y agoWindows is also case-insensitive but case-preserving
- self_awareness 2y agoMaybe macOS is case-preserving, but it's not encoding-preserving. If you create a file using a composed UTF-8 "A", the filesystem layer will decompose the string to another form, and create the filename using that decomposed form "B". Of course, "A" and "B" when compared can be completely different (even when compared using case insensitivity enabled), yet will point to the same file. More info here: https://eclecticlight.co/2021/05/08/explainer-unicode-normalization-and-apfs/ https://eclecticlight.co/2021/05/08/explainer-unicode-normal...
- halostatue 2y agomacOS (Darwin) has always written filenames as NFD via the macOS APIs. The underlying POSIX-ish APIs may not do NFD, but Finder and every native macOS GUI program gets files in NFD format.
- self_awareness 2y agoAnd this is different from what I wrote how exactly? Btw, this has nothing to do with POSIX vs Finder, it's a filesystem driver trait, at least for HFS+, but probably for APFS as well.
- alt227 2y agoIMO this is the worst possible solution, as what you are seeing is not what you are getting. You do not actually know what is being stored on the file system, and your searches are fuzzy rather than precise.
- filleduchaos 2y ago> You do not actually know what is being stored on the file system This makes no sense to me. Did the user's file explorer (whether GUI or via commands like `ls`) suddenly disappear?
- smt88 2y ago> That's how it should be Why? Windows is also not case-sensitive, so it's not like there's a near-universal convention that S3 is ignoring. Case sensitivity in file names is surprising even to non-technical people. If someone says they sent you "Book Draft 1.docx" and you check your email to find "Book draft 1.docx," you don't say, "Hey! I think you sent me the wrong file!" Casing is usually not meaningful even in written language. "Hi, how are you?" means the same thing as "hi, how are you?" Uppercase changes meaning only when distinguishing between proper and common nouns, which is rarely a concern we have with file names anyway.
- josephcsible 2y ago> If someone says they sent you "Book Draft 1.docx" and you check your email to find "Book draft 1.docx," you don't say, "Hey! I think you sent me the wrong file!" But you also wouldn't say that if they sent "Book - Draft 1.docx", "Book Draft I.docx", "BookDraft1.docx", "Book_Draft_1.docx", or "Book Draft 1.doc", and surely you wouldn't want a filesystem to treat all of them as the same.
- atkailash 2y ago[dead]
- cmcconomy 2y agoyou called it - those are different situations all right
- quickslowdown 2y agoThis is a personal reason, but the reason I prefer case sensitive directory names is I can make "logical groupings" for things. So, my python git directory might have "Projects/" and "Packages/," and the capitalization not only makes them stand out as a sort of "root path" for whatever's underneath, but the capitalization makes me conscious of the commands I'm typing with that path. I can't just autopilot a path name, I have to consciously hit shift when tab completion stops working. That might sound like a dumb reason, but it's kept me from moving things into the wrong directory, or accidentally removing a directory multiple times in the past. I also use Windows regularly and it really isn't a hindrance, so maybe I wouldn't actually be bothered if everything was case sensitive.
- josephcsible 2y agomacOS has case sensitivity. It's just off by default and is a major pain to turn on. You have to either reinstall from scratch onto a case-sensitive partition, or change the "com.apple.backupd.VolumeIsCaseSensitive" xattr from 0 to 1 in a Time Machine backup of your whole system and then restore everything from it.
- JonathonW 2y agoYou shouldn't do this if you value things working, though-- this is a pretty rare configuration (you have to go way out of your way to get it), so many developers won't test with it and it's not unheard of for applications to break on case-sensitive filesystems. If you absolutely need case-sensitivity for a specific application or a specific project, it's worth seeing if you can do what you need to do within a case-sensitive disk image. It may not work for every use-case where you might need a case-sensitive FS, but if it does work for you, it avoids the need to reinstall to make the switch to a case-sensitive FS, and should keep most applications from misbehaving because the root FS is case-sensitive.
- josephcsible 2y agoMost things work fine, but it will break (or at least did break at one point) Steam, Unreal Engine, Microsoft OneDrive, and Adobe Creative Cloud. I'm rather surprised about the first two, since they both support Linux with case-sensitive filesystems. I took the opposite approach as you, though: making my root filesystem case-sensitive and creating a case-insensitive disk image if I ever needed those broken programs.
- danielheath 2y agoI keep a case sensitive volume around to checkout code repositories into. For everything else I prefer it insensitive, but my code is being deployed to a case sensitive fs.
- jimvdv 2y agoI just mount a case sensitive Apple File System disk image at ~/code, works well
- pavlov 2y agoCase insensitive is how humans think about names. “John” and “New York” are the same identifiers as “john” and “new york”. It would be pretty weird if someone insisted that their passport is invalid because the name is printed in all caps and that’s not their preferred spelling. IMO the best thing would be to call Unix-style case-sensitive file names something else. But it’s obviously too late for that.
- Hamuko 2y agoHumans will also treat "Jyväskylä", "Jyvaskyla" and "Jyvaeskylae" as the same identifiers but I don't think that's a good basis for file storage to have those be the same filenames.
- pavlov 2y agoIn the era of Unicode, this battle is pretty much lost. Several different code point sequences can produce the glyph 'ä', and user input can contain any of these. You need to normalize anyway.
- glandium 2y agoAnd macOS does that normalization at the filesystem level.
- justincormack 2y agoPassport offices care and may object.
- bigstrat2003 2y agoAgreed. I think case sensitivity in Unix filesystems is actually a pretty poor design decision. It prioritizes what is convenient for the computer (easy to compare file paths) over what makes sense for the user (treating file paths the same way human intuition does).
- JackSlateur 2y ago
- pjmlp 2y agoUNIX is one of the few OSes that went down that path. Others do offer the option if one is so inclined, and also prepared to deal with legacy software that expects otherwise. Which is also the case with macOS, because although it is a UNIX, OS X had to catter to the Mac OS developer community used to HFS and HFS+.
- codeflo 2y agoCuriously, iOS and iPadOS file systems are case-sensitive. There's less legacy there, so they opted to do the correct thing.
- larkost 2y agoPlease don't call this "the correct thing". Please recognize that there are multiple, valid, points of view. What you meant is "the thing I like".
- codeflo 2y agoIt's not "the thing I like", it's the better tradeoff. It's less complex and thus more secure (due to reduced API surface and fewer opportunities to make lookup mistakes or to mistakenly choose the wrong out of dozens of kinds of case-insensitive comparison in a security decision). It's also potentially faster, and more compatible with other Unixes.
- dagrz 2y agoAuthor here. There's no complaint. It's an observation rather than an absolute good or bad. It's something you have the consider in designing your application.
- ivanhoe 2y ago> That's how it should be Why exactly? I'm not aware of any benefits of filenames being case-sensitive, it just opens a room for tons of very common mistakes that literally can't happen otherwise. It's not like in coding where it helps enforce the code style and thus aids readability - and even in programming it was a source of PITA to solve bugs before IDEs became smart enough to catch typos in var names. One thing I loved in Pascal the most is that it didn't care about the case, unlike the C.
- codeflo 2y agoExcept at the UI layer (where you can easily offer suggestions and do fuzzy search), the opposite is true. There are so many different ways to do case-insensitive string comparisons, and it's so easy to forget to do that in one place, that case-insensitivity just leads to ton of bugs (some of which will be security critical). For example, did you know that Microsoft SQL Server treats the columns IS_ADMIN and is_admin as either the same or two different columns depending on the database locale (because e.g. Turkish distinguishes between i and I)? That's at least a potential security bug right there.
- capitol_ 2y agoThe case-sensitivity algorithm needs a locale as input in order to correctly calculate the case conversion rules. The most common example is probably that i (U+0069 LATIN SMALL LETTER I) and I (U+0049 LATIN CAPITAL LETTER I) transform into each other in most locales, but not all. In locales az and tr (the Turkic languages), i uppercases to İ (U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE), and I lowercases to ı (U+0131 LATIN SMALL LETTER DOTLESS I). case-insensitive is all fine if you only handle text that consist of A-Za-z, but as soon as you want to write software that works for all languages it becomes a mess.
- yencabulator 2y agoMinor nitpick: case-insensitive comparison is a separate problem from case conversion, and IIRC a little simpler. Still locale-specific.
- jerf 2y ago
- andruby 2y agoYou can format disks in MacOS to be case sensitive.
- segfaltnh 2y agoCase sensitive filesystems are a mistake.
- _xivi 2y agoI agree 100%. From a technical implementation pov 'A' & 'a' are well established as different characters (ascii, unicode, etc). Regardless of personal preference, I don't understand how can a developer/Sys admin be surprised and even frustrated that a file system is case sensitive. The developer is still free to abstract this away for the end user when it makes sense such as search results