Hi, I've been running into an annoying problem with really long file names returned by NTFS-3G. It seems that as soon as the length of any file name string fed to fuse_fill_dir_t during a readdir operation exceeds 255 bytes, the entire directory becomes unreadable (no entries show up at all when trying to list it). The call to fuse_fill_dir_t still returns 0, so from the implementor's point of view, no problem can be detected. You should be able to reproduce this easily by modifying the hello_path variable in hellofs to get a sizeable file name.
Maybe this is an example of undefined behaviour, and maybe 255 bytes is some kind of limit for what the MacFUSE/FUSE will handle, but it does mean that a MacFUSE file system is not able to produce as long file names as for instance the HFS+ driver and the built in NTFS driver can produce. An example: Consider a file name with 255 chinese characters (say 255 repetitions of δΈ, zhong). This fits into both the NTFS and HFS+ structures which use 255 UTF-16 units internally for file name storage. While the HFS+ driver allows the use of such a file name, NTFS-3G can't do it since the file name expands to 765 bytes when encoded to UTF-8, which makes the readdir operation fail as stated above. Is there a solution to this, or is it a known limitation? In the hypothetical worst case, a UTF-8 encoded file name returned by NTFS-3G may be as large as 2295 bytes after NFD normalization (255 korean characters decomposed into 3 jamos, each taking up 3 bytes in UTF-8 form), so I've been running into this problem not only with test cases but with korean file names with as little as 25-30 characters. In any case, I don't think the fuse_fill_dir_t behaves correctly... if it encounters any problem when fed a filename that is too large, there should be a way of detecting failure. Regards, - Erik --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
