> One question though: The getattrlist(2) manpage states that when > retrieving ATTR_CMN_NAME, the NAME_MAX limitation also applies (quote: > "The attribute data length will not be greater than NAME_MAX + 1"). > If this is true, then this can't be the API that Finder uses to get the > full file name? Or is the documentation incorrect?
Well, you should easily be able to test that for yourself. Write a trivial program that retrieves ATTR_CMN_NAME and see if it gets the full name or not. The documentation is incorrect. For ATTR_CMN_NAME, the name portion of the attribute block can be as large as (255 * 3 + 1) = 766 bytes. That's for HFS+. No reason you couldn't go even longer if the file system can handle it. > I assume that it is not possible to explicitly supply the ATTR_CMN_NAME > attribute with the current version of MacFUSE? That doesn't solve the problem though. Programs won't normally know to fetch a name if the file doesn't even appear in the directory listing. So we're back to requiring mangling of long names. > I did note during testing, as you pointed out, that I can lookup and > perform open, read, write, ... operations using the unmangled form of > the really long file names in HFS+ through BSD apis... so I support the > idea that MacFUSE should not automatically fail lookup of file names > that exceed MAXNAMLEN... though if this could somehow affect the > operation of other existing FUSE file systems (can't immediately see > how..), then maybe it could be controlled using a mount time option. We can revisit this if/when some user-space file system that needs this has a functional implementation of mangling. Amit --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MacFUSE" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/macfuse?hl=en -~----------~----~----~----~------~----~------~--~---
