delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/09/22:05:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 9 Dec 2004 22:00:00 -0500
From: "Pierre A. Humblet" <pierre DOT humblet AT ieee DOT org>
To: cygwin AT cygwin DOT com
Cc: llewins AT raytheon DOT com
Subject: Re: 1.38: Bug set -o posix and "cd ."
Message-ID: <20041210030000.GA626455@hpn5170>
References: <OF6926B476 DOT 6E00126C-ON88256F63 DOT 005627FB-88256F63 DOT 00564E54 AT mck DOT us DOT ray DOT com>
Mime-Version: 1.0
In-Reply-To: <OF6926B476.6E00126C-ON88256F63.005627FB-88256F63.00564E54@mck.us.ray.com>
User-Agent: Mutt/1.4.1i

On Tue, Dec 07, 2004 at 07:42:44AM -0800, Lloyd J Lewins wrote:
> In bash, after entering posix mode (set -o posix), if the current path is 
> a mounted UNC file, then cd fails. For example:
>  
> bash-2.05b$ mount
> c:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system 
> (binmode)
> \\es-eng-essfile\users\00c3197 on /home/00c3197 type user (binmode)
> \\es-eng-essfile\hpps on /home/hpps type system (binmode)
> c:\cygwin\bin on /usr/bin type system (binmode)
> c:\cygwin\lib on /usr/lib type system (binmode)
> c:\cygwin on / type system (binmode)
> c: on /c type system (binmode)
> d: on /d type system (binmode)
> i: on /i type system (binmode)
> j: on /j type system (binmode)
> l: on /l type system (binmode,noexec)
> e: on /cygdrive/e type user (binmode,noumount)
> f: on /cygdrive/f type user (binmode,noumount)
> g: on /cygdrive/g type user (binmode,noumount)
> s: on /cygdrive/s type user (binmode,noumount)
> bash-2.05b$ pwd
> /home/hpps
> bash-2.05b$ cd .
> bash-2.05b$ set -o posix
> bash-2.05b$ cd .
> bash: cd: .: No such file or directory
> 
> Others have seen this problem, for example:
>  
> http://www.cygwin.com/ml/cygwin/2003-12/msg00663.html

Lloyd,

When doing a cd, bash always checks if all prefixes of the new path
are directories. With the posix option, it complaints if any one isn't.
I ignore the rationale for this behavior.

In your case, /home is not a directory, although /home/hpps is one.
You can cure the problem by patching bash to accept prefixes of mount
points, or, more simply, by creating /home, either as a directory or as
a mount point (to any valid directory).

Pierre




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019