This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to allow trailing dots on managed mounts

On Sat, Dec 18, 2004 at 04:12:17PM -0500, Igor Pechtchanski wrote:
>On Fri, 17 Dec 2004, Christopher Faylor wrote:
>> On Fri, Dec 17, 2004 at 06:01:04PM -0500, Pierre A. Humblet wrote:
>> >Christopher Faylor wrote:
>> >
>> >> While I detest the trailing dot crap, I don't want cygwin to be
>> >> inconsistent. I don't want ls /bin./ls.exe to fail but ls
>> >> /cygdrive/c/bin./ls.exe to work.
>> >
>> >Assuming a normal install, the first one is c:\cygwin\bin.\ls.exe,
>> >which would NOT fail, while the second is c:\bin.\ls.exe, which would
>> >fail as expected (not due to dots).
>> Ok.  Yes.  I had a typo.
>> If /cygdrive/c/cygwin/bin./ls.exe works, then /bin./ls.exe should also
>> work. Or, both should fail.  "consistent"
>If I may chime in, I think there are at least three separate possibilities
>for accessing each directory:
>1) via a managed Cygwin mount;
>2) via a regular Cygwin mount;
>3) via a /cygdrive-prefixed path; and maybe
>4) via a Win32 path.
>There's a need for consistency in each of the above cases, but not
>between cases.  Each may justifiably have different behavior.  We
>already default to textmode for 4), and 2) and 3) may have different
>textmode/binmode behavior.

2 and 3 don't have different textmode/binmode behavior.  You use mount to
control the behavior.

>It could be argued that as you go down this list, the POSIXness
>decreases, so it's ok to distinguish trailing dots, e.g., in the first
>two cases, and ignore them in the latter two.

So, you're saying that 2 should always say "file not found"?  Non-managed
mounts can't reliably distinguish trailing dots.  Unless you want to make
every file a symbolic link to the "real" file or always issue an ENOENT
when a pathname component has a trailing dot.

I don't see a difference between /cygdrive or a mounted drive.  Both are
cygwin inventions.  I don't see a logical explanable reason for what they
support to be different.

That is another case that I didn't specify.  Should /cygdrive./c work?
I think I'm coming back to my ENOENT for all trailing dots argument...

>Just my $0.02.

Using past behavior, which has certainly changed in the last six months
and undoubtedly changed a couple of times prior to that, or
extrapolating from the behavior of textmode/binmode to justify this is
really not an argument that I'm interested in.  You can cause cygwin
programs to control the behavior of textmode/binmode with appropriate
flags to fopen or open or by specifying the explicit use of mount.
There is no easy way for a cygwin program to figure out what to do with
trailing dots.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]