5 ms·
The most common desktop file systems are case-insensitive, which complicates the picture.
by pavlov 5y ago
The most common desktop file systems are case-insensitive, which complicates the picture.
- Pxtl 5y agoStill, it looks like the right thing to do is let the filesystem do the filesystem's job. The filesystem should be normalizing unicode and enforceing the case-insensitivity and whatnot, but just the filesystem. Wrappers around it like whatever Nextcloud is doing should be treating the filenames as a dumb pile of bytes.
- dataflow 5y agoI'm not sure this problem even has a "right" solution. > Wrappers around it like whatever Nextcloud is doing should be treating the filenames as a dumb pile of bytes. What do you do when the input isn't a dumb pile of bytes, but actual text? (Like from a text box the user typed into?)
- rzzzt 5y agoMaintain a table that maps the original file name to random-generated one that doesn't hit these gotchas.
- rob_c 5y agoAnd place the files in chunks, and... Wait I think we're getting close to reinventing block storage again ;)
- dataflow 5y agoI'm afraid I don't follow. Who maintains this table and who consumes it? What if they're different entities? How do you prevent it from going out of sync with the file system when the user renames a file? Are you inventing your own file system here? How do you deal with existing file systems?
- rzzzt 5y agoI assumed that you have a system where file management/synchronization happens strictly through a web interface, and files are not changed or renamed outside this system's knowledge. Under these preconditions, having such a mapping table frees the users from having to abide whatever restrictions the underlying file system places on valid file names.
- dataflow 5y agoOh I was talking about the general case from a programming standpoint. What do you do on a typical local filesystem? The point I'm trying to get at being, you need to worry about the representation at multiple layers, not just at the bottom FS layer.
- mjevans 5y agoCase insensitivity is a braindead behavior. If desired it should be a fallback path selecting the best match, not the first resort.
- laurent92 5y agoSo you’re fine with ~/Downloads and ~/downloads coexisting as entirely separate directories? And John.McCauley@yahoo.fr and john.mccauley@yahoo.fr being attributed to two different people ;)
- justaguy37 5y agocan we just say no to capital letters? (or lowercase?) do capital letters have a good enough usage case to justify their continued existence?
- colejohnson66 5y agoYou are free to stop using capital letters, but good luck getting everyone to go along. Capitals have been around for centuries (they’re older than the printing press) and aren’t going anywhere.
- bmn__ 5y agoThe lower-case letters in Greek/Latin/Cyrillic are the new additions, initially we only had what is now called upper-case.
- Lammy 5y agoFun fact: The Apple Ⅱ and Ⅱ+ originally only did upper-case, and it was very popular to add a Shift Key / lower-case mod via one of the gamepad buttons: https://web.archive.org/web/20010212094858/http://home.swbell.net/rubywand/Csa2KBPADJS.html#001 https://web.archive.org/web/20010212094858/http://home.swbel...
- vgel 5y agoFirst one: yes, though good UI should prevent it from happening unless the user really intended it (for example I have ~/Documents symlinked into Dropbox, so ~/documents could be local-only documents) Second one: no, emails are not filenames, and more generally distinguishability is more important for identifiers. In cases where identifiers like emails need to be mapped to filenames, like caches, they should be normalized.