Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" 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: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/