This is the mail archive of the
mailing list for the Cygwin project.
Re: open() giving ENOENT when trying to create files with control chars
- From: ericblake at comcast dot net (Eric Blake)
- To: Yitzchak Scott-Thoennes <sthoenna at efn dot org>, cygwin at cygwin dot com
- Date: Fri, 09 Dec 2005 00:31:32 +0000
- Subject: Re: open() giving ENOENT when trying to create files with control chars
From: Yitzchak Scott-Thoennes <email@example.com>
> Moving on to another "non-portable" problem, I want to create a file
> with a space at the end of the name, but cygwin is stripping spaces.
> Despite the comment in the code, this does seem to be allowed (though
> I suspect it may be via NtCreateFile only, since windows commands
> don't seem to handle filenames with spaces at the end well). I tried
Windows strips trailing spaces and dots (unless the file name
consists only of spaces). You need a managed mount to
preserve those; otherwise "foo ", "foo.", "foo. . . . ", "foo",
and a bunch of other spellings all refer to the same file.
Unlike in the other case (non-portable characters, which POSIX
allows an implementation to reject), the stripping of trailing
'.' from filenames is a violation of POSIX, but since Windows
is the culprit, cygwin cannot avoid it (except with the overhead
of managed mounts).
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html