Case-insensitive ext4
Case-insensitive ext4
Posted Mar 29, 2019 9:16 UTC (Fri) by Karellen (subscriber, #67644)In reply to: Case-insensitive ext4 by Cyberax
Parent article: Case-insensitive ext4
How is a call to open() getting the filename to open? Either it's going to from an existing directory scan, in which case the capitalisation/normal form should already be correct, or it's going to be because a user has selected a file - in which case the shell/picker/whatever should be able to do that work already?
Where would calls to open() be getting these correctly named but incorrectly capitalised/normalised filenames from?
Posted Mar 29, 2019 9:20 UTC (Fri)
by Cyberax (✭ supporter ✭, #52523)
[Link]
You can try a happy case and just attempt an open() with the provided name. If it fails, you need to scan the directory to find a matching file with a different case.
And you can't really cache the negative result, patterns like "if !exists(fname) {creat(fname);}" are exceedingly common.
Posted Apr 4, 2019 17:09 UTC (Thu)
by Wol (subscriber, #4433)
[Link]
The user, maybe?
What about the use case where I type in a name in a picker, and it displays a bunch of matches?
Or what about the case where I typed in the name on the command line? Some of us still use a command line, you know ...
Cheers,
Case-insensitive ext4
You have an SMB request to open a file, with a file name. There's nothing else.
Case-insensitive ext4
Wol