cd ....

Bob McGowan rmcgowan@veritas.com
Thu Jul 6 11:07:00 GMT 2000


There is a difference between the Windows handling of this and what
bash/cygwin is doing.  Windows cmd (on NT 4.0) appears to ignore the
request.  The current directory does not change and cd with no args
gives the same current path as existed before trying the 'cd ...'
command.

bash/cygwin is "changing" to the specified location, so pwd reports the
'new' path, as was given in the cd request.  But an ls shows the
directory contents are the same as for the starting directory, so no
change has actually happened.

I also found that this only works one level deep for bash/cygwin:

    $ cd ..../....
    bash: cd: ..../....: No such file or directory

But cmd treats this the same as a single level.

Are these the expected behaviors?

Chris Faylor wrote:
> 
> On Fri, Jul 07, 2000 at 02:01:31AM +0900, Yukihiko Sohda wrote:
> >Hi,
> >
> >I reports a trivial(?) bug.
> >"cd" accepts illegal path like this.
> >
> >[/]cd ...
> >[/...]cd ..
> >[/]cd ...
> >[/...]cd ...
> >[/.../...]cd ..
> >[/.../.../..]cd /
> >[/]cd ...........
> >[/...........]pwd
> >/...........
> >[/...........]
> >
> >I examined this with the following cygwin1.dll,
> >and got the similar result.
> >
> >- CYGWIN_NT-5.0 WOODSTOCK 1.1.2(0.21/3/2) 2000-06-06 22:20 i686 unknown
> >- CYGWIN_NT-5.0 WOODSTOCK 1.1.3s(0.24/3/2) 2000-07-04 23:55 i686 unknown
> 
> Have you tried the same thing with Windows?  Windows accepts these paths.
> 
> I don't want to add a check in the already overburdened path handling code
> just to stop somebody from doing something that is valid on Windows.
> 
> cgf
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list