public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
Date: Fri, 05 Mar 2010 17:40:00 -0000	[thread overview]
Message-ID: <20100305172048.GN7980@calimero.vinschen.de> (raw)
In-Reply-To: <4B913AF2.3070102@redhat.com>

On Mar  5 10:10, Eric Blake wrote:
> According to Edward Lam on 3/5/2010 9:55 AM:
> > Corinna Vinschen wrote:
> >> Is that a case-sensitivity issue, perhaps?  See
> >> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive
> >>
> > 
> > I don't see how it is:
> > 
> > $ dash
> > $ cd /c
> > $ ls -d W*
> > WINDOWS
> > $ cd c:/WINDOWS
> > cd: 3: can't cd to c:/WINDOWS
> 
> Let's rule out bash vs. dash complexities, and first focus on whether
> cygwin1.dll might be at fault.  Untested code:
> 
> #include <unistd.h>
> #include <stdio.h>
> #include <string.h>
> #include <errno.h>
> int main(int argc, char**argv)
> {
>   int e = chdir(argv[1]);
>   char *cwd = getcwd(NULL,0);
>   return printf ("chdir to %s: %d(%s), now in %s\n", argv[1],
>     e, strerror(e), cwd);
> }

Works fine in Cygwin, I just tested it:

  # cat > chdir.c << EOF
  #include <stdio.h>
  #include <limits.h>

  int
  main (int argc, char **argv)
  {
    int ret = 0;
    if (argc > 1)
      ret = chdir (argv[1]);
    if (ret)
      perror ("chdir");
    else
      {
	char buf[PATH_MAX];
	getcwd (buf, PATH_MAX);
	printf ("pwd: %s\n", buf);
      }
    return ret ? 1 : 0;
  }
  EOF
  $ gcc -g -o chdir chdir.c
  $ ./chdir C:/Windows
  pwd: /cygdrive/c/Windows

It's a problem in dash apparently.  Btw., tcsh also has a problem
with DOS paths, if you use backslashes, see the prompt:

  [~]$ cd C:\\Windows
  [~/C:\Windows]$ pwd
  /cygdrive/c/Windows

I just don't care enough for DOS paths so I won't fix.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

  reply	other threads:[~2010-03-05 17:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 15:36 Eric Blake
2009-07-14 15:36 ` GOLD STAR! (was Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash) Corinna Vinschen
2010-01-21 15:01 ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
2010-01-21 16:03   ` Christopher Faylor
2010-01-22  4:15   ` Eric Blake
2010-03-05 14:11     ` Edward Lam
2010-03-05 15:33       ` Corinna Vinschen
2010-03-05 17:00         ` Edward Lam
2010-03-05 17:01           ` Edward Lam
2010-03-05 17:06             ` Edward Lam
2010-03-05 17:20           ` Eric Blake
2010-03-05 17:40             ` Corinna Vinschen [this message]
2010-03-05 20:11               ` Edward Lam
2011-12-03 22:11               ` Eric Blake
2013-03-28 15:08                 ` [PATCH] Support DOS paths in dash Edward Lam
2010-03-05 17:10         ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100305172048.GN7980@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).