From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7830 invoked by alias); 14 Jan 2013 16:05:08 -0000 Received: (qmail 7631 invoked by uid 22791); 14 Jan 2013 16:04:37 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 14 Jan 2013 16:04:21 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 4E5725205E5; Mon, 14 Jan 2013 17:04:17 +0100 (CET) Date: Mon, 14 Jan 2013 16:05:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: stat() and tilde prefix (was bad bash tab completion) Message-ID: <20130114160417.GA8617@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <5024B4D4.6080409@shaddybaddah.name> <50F395D5.4050201@shaddybaddah.name> <20130114061747.GB16739@ednor.casa.cgf.cx> <20130114100002.GA22039@calimero.vinschen.de> <20130114152714.GC27617@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130114152714.GC27617@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2013-01/txt/msg00185.txt.bz2 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 . > 12/26/2012 21:34 .. > 1/12/2013 16:27 bin > 1/14/2013 10:20 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