This is the mail archive of the cygwin@cygwin.com 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: cd accepting paths with trailing dots that don't exist (bash and tcsh)


Steve,

Sounds to me like you're interested in knowing some of the internal 
details of the border between the Cygwin POSIX emulation layer and
the support provided by the WIN32 API.  The best way to get these details
is to actually "dig in" to the code and see what it does.  It is possible 
that the concerns you have can be addressed in a generally useful way
by the Cygwin DLL but I doubt anyone's look into them in any detail such 
that it would allow them to provide you a direct and simple answer.  If
you're interested in those answers, you're welcome to pursue them yourself,
assuming, of course, that someone on this list doesn't provide you with 
all the details you're looking for. 

Larry

Original Message:
-----------------
From: Steve Fairbairn steve.fairbairn@perwill.com
Date: Tue, 10 Dec 2002 15:49:24 -0000
To: cygwin@cygwin.com
Subject: RE: cd accepting paths with trailing dots that don't exist (bash
and tcsh)



Corinna & All,

After a play with a dos command prompt, I see your point.  I would however
point out that there is still a difference with bash.  If you have more than
one trailing . in bash, the 'directory' it puts you in is empty, and you
cannot create any files in there.  Also bash seems to retain the trailing
dots as part of your cwd, which the dos prompt doesn't do.  With the dos
prompt, it just seems to strip the trailing dots off, and always leave you
in the directory you trailed with dots.

As for "correct functionality" I meant whatever the cygwin developers define
as correct.  My personal preference would be for bash to complain about the
trailing dots, but I understand that the shell probably just uses the
Windows OS chdir function, and so it is Windows deciding the path is valid.
Would there be massive overhead in bash re-reading the cwd after a
successful chdir, and so not display the dots?  How come ls etc doesn't work
if there is more than one trailing dot?

Thanks,

Steve.

-----Original Message-----
From: Corinna Vinschen [mailto:corinna-cygwin@cygwin.com]
Sent: 10 December 2002 15:33
To: 'cygwin@cygwin.com'
Subject: Re: cd accepting paths with trailing dots that don't exist
(bash and tcsh)


On Tue, Dec 10, 2002 at 09:47:10AM -0000, Steve Fairbairn wrote:
> I've just come across some very strange (to me at least) results with the
cd
> command in both bash and tcsh under cygwin (1.3.17-1).  I have cut and
paste
> from my shell as I feel it would be easier for you to read it yourself.
> 
> I don't have any aliases set.  The output is all from bash, but tcsh
seemed
> to do exactly the same thing.
> 
> I apologise if this is correct functionality, but the suse box I tried
this
> on complained bitterly at the lack of blah... etc existing.

Define "correct functionality".

Honestly, it's a Windows thingy.  Windows allows any number of trailing
dots for a path or file name.  Go figure!

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

******************************************************* 
This email has originated from Perwill plc (Registration No. 1906964) 
Office registered at: 13A Market Square, Alton, Hampshire, GU34 1UR, UK 
Tel: +44 (0)1420 545000 
Fax: +44 (0)1420 545001 
www.perwill.com 
******************************************************* 
Privileged, confidential and/or copyright information may be contained 
in this email, and is only for the use of the intended addressee. 
To copy, forward, disclose or otherwise use it in any way if you are not 
the intended recipient or responsible for delivering to him/her is
prohibited.
If you receive this email by mistake, please advise the sender immediately, 
by using the reply facility in your email software.

We may monitor the content of emails sent and received via our network 
for the purposes of ensuring compliance with policies and procedures. 
This message is subject to and does not create or vary any contractual 
relationships between Perwill plc and the recipient. 
******************************************************* 
Any opinions expressed in the email are those of the sender and not 
necessarily of Perwill plc.
******************************************************* 
This email has been scanned for known viruses using 
McAfee WebShield 4.5 MR1a 
******************************************************* 



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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