This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cant access to files more than 128 utf-8 symbol long names
- From: Mikhail Usenko <mikeus at nm dot ru>
- To: cygwin at cygwin dot com
- Date: Wed, 11 Dec 2013 19:02:52 +0400
- Subject: Re: cant access to files more than 128 utf-8 symbol long names
- Authentication-results: sourceware.org; auth=none
- References: <52A6BFA4 dot 9010101 at spektr-rfs dot ru> <20131210102755 dot GQ2527 at calimero dot vinschen dot de> <20131211174922 dot c0c8432e69ce1423511d2cbf at nm dot ru> <20131211140907 dot GD2527 at calimero dot vinschen dot de>
I couldn't figure out how a POSIX filename passed to a Cygwin application running on the Windows system may become longer than NAME_MAX=1020 bytes if the maximum filename length in NTFS is 255 UTF-16 symbols (i.e. 1020 bytes for the biggest 4 byte UTF-8 code unit)?
What causes the ENAMETOOLONG error? In the most of POSIX functions ENAMETOOLONG is returned if the length of a component of a pathname is longer than {NAME_MAX} or the length of a pathname exceeds {PATH_MAX}. On NTFS there is no files with pathname component longer than 1020 bytes and the length of the full pathname is limited by the Unicode API (32767 chars * 4 byte = 128KiB).
--
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple