From: Frank L. <fra...@go...> - 2011-01-27 12:55:37
|
2011/1/27 HAT <ha...@fa...>: > Frank Lahm <fra...@go...>, Wed, 26 Jan 2011 19:31:55 +0100 >> 2011/1/26 HAT <ha...@fa...>: >>> Frank Lahm <fra...@go...>, Wed, 26 Jan 2011 16:49:20 +0100 >>>> 2011/1/26 HAT <ha...@fa...>: >>>>> Frank Lahm <fra...@go...>, Wed, 26 Jan 2011 16:40:45 +0100 >>>>>>>>> BTW, >>>>>>>>> Mac OS X's tar command can save 255-over filename. >>>>>>>>> Mac OS X's tar command CAN extract this archive. >>>>>>>> >>>>>>>> Really? I must check that out if I have the time too as I wouldn't >>>>>>>> believe it until seen myself. As can be seen using the code example >>>>>>>> below, it's just not possible to get creat(2) (which is just a wrapper >>>>>>>> for open(2) w. O_CREAT) to create a file with a name longer NAME_MAX. >>>>>>> >>>>>>> See attached tar file. >>>>>> >>>>>> Where and how did you create that file in the archive ? It's >>>>>> strlen(name) is 256 and I have no OS at hand which allows me to create >>>>>> such a file. >>>>> >>>>> $ cd /Volumes/afpvol/ >>>>> $ tar -cf test.tar test/ >>>>> >>>>> Extract it on AFP Volume, not HFS+. >>>> >>>> I can extract it on HFS+ just fine. I was asking where and how did you >>>> _create_ it ? >>> >>> Server: Mac OS X hostname=cubechan afp://cubechan._afpovertcp._tcp.local/MacOSX >>> Client: Mac OS X hostname=imacchan >>> >>> There is "άάάά...άάάa" in "afp://cubechan._afpovertcp._tcp.local/MacOSX/test directory" . >>> >>> hat@imacchan:~ >cd /Volumes/MacOSX/test/ >>> hat@imacchan:/Volumes/MacOSX/test >ls >>> άάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάάa >> >> These are exactly 255 bytes, not more. >> For most names when I try to rename a file or folder in Finder to a >> name whos strlen() is greater then 255 bytes, it gets truncated to 255 >> bytes. One exception is the other name you passed in the dmg, which as >> it seems triggers an encoding bug in the OS: > > No. You made a mistake in how to count. Hm, probably. So PATH_MAX is appliead to code points, not just plain strlen(char *). Thanks! -f |