On Thu Feb 6 22:14:36 2025 +0000, Gabriel Ivăncescu wrote:
Are you sure that "name" (I mean the one passed to the function) can't have trailing slashes or multiple of them? I somehow remember it was a possible concern at some point long ago when the other case-insens patchset got reviewed by Rémi, but not sure anymore.
I think `lookup_unix_name` is supposed to reject trailing slashes with `OBJECT_NAME_INVALID`, because it's just a special case of an empty path component.
This is just a suggestion, so it's not necessary to take my code as-is. I still think that it's better to (1) adopt an unambiguous name, and (2) try not to modify the argument at all but instead allocate a separate buffer for that (modifying and reverting is error-prone in general).
For completeness, `fd->unix_name` is returned by realpath(), so not a concern.
Correct me if I'm wrong, though.