delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/01/14/15:13:20

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 14 Jan 2013 17:04:17 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: stat() and tilde prefix (was bad bash tab completion)
Message-ID: <20130114160417.GA8617@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <5024B4D4 DOT 6080409 AT shaddybaddah DOT name> <50F395D5 DOT 4050201 AT shaddybaddah DOT name> <20130114061747 DOT GB16739 AT ednor DOT casa DOT cgf DOT cx> <20130114100002 DOT GA22039 AT calimero DOT vinschen DOT de> <20130114152714 DOT GC27617 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20130114152714.GC27617@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Jan 14 10:27, Christopher Faylor wrote:
> On Mon, Jan 14, 2013 at 11:00:02AM +0100, Corinna Vinschen wrote:
> >The first step of converting a POSIX path to a Windows path is to
> >normalize the path.  "." and ".." components are simply dropped:
> >
> >  "a/b/./c"  -> "a\b\c"
> >  "a/b/../c" -> "a\c"
> >[...]
> Also:
> 
>   c:\>dir foo\bar\..\..
> 
>    Volume in drive S is share          Serial number is e620:3c3d
>    Directory of  S:\*
> 
>    1/11/2013   9:58         <DIR>    .
>   12/26/2012  21:34         <DIR>    ..
>    1/12/2013  16:27         <DIR>    bin
>    1/14/2013  10:20         <DIR>    cgf
>    ...
> 
> I don't have a foo directory but cmd was happy to just ignore that
> fact and show my the root directory.  This is YA place where Windows
> and Linux differ drastically.

Indeed.  Before writing my mail I tested the "GetFullPathName" function,
and I was not exactly surprised to find that it behaves as you describe
for CMD.


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

- Raw text -


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