Case-insensitive ext4
Case-insensitive ext4
Posted Mar 29, 2019 9:20 UTC (Fri) by Cyberax (✭ supporter ✭, #52523)In reply to: Case-insensitive ext4 by Karellen
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?
You have an SMB request to open a file, with a file name. There's nothing else.
You have an SMB request to open a file, with a file name. There's nothing else.
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.